| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 if (!holder.is_identical_to(receiver)) return; | 986 if (!holder.is_identical_to(receiver)) return; |
| 987 code = isolate()->stub_cache()->ComputeLoadNormal(); | 987 code = isolate()->stub_cache()->ComputeLoadNormal(); |
| 988 } | 988 } |
| 989 break; | 989 break; |
| 990 case CALLBACKS: { | 990 case CALLBACKS: { |
| 991 Handle<Object> callback_object(lookup->GetCallbackObject()); | 991 Handle<Object> callback_object(lookup->GetCallbackObject()); |
| 992 if (!callback_object->IsAccessorInfo()) return; | 992 if (!callback_object->IsAccessorInfo()) return; |
| 993 Handle<AccessorInfo> callback = | 993 Handle<AccessorInfo> callback = |
| 994 Handle<AccessorInfo>::cast(callback_object); | 994 Handle<AccessorInfo>::cast(callback_object); |
| 995 if (v8::ToCData<Address>(callback->getter()) == 0) return; | 995 if (v8::ToCData<Address>(callback->getter()) == 0) return; |
| 996 if (!callback->IsCompatibleReceiver(*receiver)) return; |
| 996 code = isolate()->stub_cache()->ComputeLoadCallback( | 997 code = isolate()->stub_cache()->ComputeLoadCallback( |
| 997 name, receiver, holder, callback); | 998 name, receiver, holder, callback); |
| 998 break; | 999 break; |
| 999 } | 1000 } |
| 1000 case INTERCEPTOR: | 1001 case INTERCEPTOR: |
| 1001 ASSERT(HasInterceptorGetter(*holder)); | 1002 ASSERT(HasInterceptorGetter(*holder)); |
| 1002 code = isolate()->stub_cache()->ComputeLoadInterceptor( | 1003 code = isolate()->stub_cache()->ComputeLoadInterceptor( |
| 1003 name, receiver, holder); | 1004 name, receiver, holder); |
| 1004 break; | 1005 break; |
| 1005 default: | 1006 default: |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 code = isolate()->stub_cache()->ComputeKeyedLoadConstant( | 1250 code = isolate()->stub_cache()->ComputeKeyedLoadConstant( |
| 1250 name, receiver, holder, constant); | 1251 name, receiver, holder, constant); |
| 1251 break; | 1252 break; |
| 1252 } | 1253 } |
| 1253 case CALLBACKS: { | 1254 case CALLBACKS: { |
| 1254 Handle<Object> callback_object(lookup->GetCallbackObject()); | 1255 Handle<Object> callback_object(lookup->GetCallbackObject()); |
| 1255 if (!callback_object->IsAccessorInfo()) return; | 1256 if (!callback_object->IsAccessorInfo()) return; |
| 1256 Handle<AccessorInfo> callback = | 1257 Handle<AccessorInfo> callback = |
| 1257 Handle<AccessorInfo>::cast(callback_object); | 1258 Handle<AccessorInfo>::cast(callback_object); |
| 1258 if (v8::ToCData<Address>(callback->getter()) == 0) return; | 1259 if (v8::ToCData<Address>(callback->getter()) == 0) return; |
| 1260 if (!callback->IsCompatibleReceiver(*receiver)) return; |
| 1259 code = isolate()->stub_cache()->ComputeKeyedLoadCallback( | 1261 code = isolate()->stub_cache()->ComputeKeyedLoadCallback( |
| 1260 name, receiver, holder, callback); | 1262 name, receiver, holder, callback); |
| 1261 break; | 1263 break; |
| 1262 } | 1264 } |
| 1263 case INTERCEPTOR: | 1265 case INTERCEPTOR: |
| 1264 ASSERT(HasInterceptorGetter(lookup->holder())); | 1266 ASSERT(HasInterceptorGetter(lookup->holder())); |
| 1265 code = isolate()->stub_cache()->ComputeKeyedLoadInterceptor( | 1267 code = isolate()->stub_cache()->ComputeKeyedLoadInterceptor( |
| 1266 name, receiver, holder); | 1268 name, receiver, holder); |
| 1267 break; | 1269 break; |
| 1268 default: | 1270 default: |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 if (lookup->holder() != *receiver) return; | 1465 if (lookup->holder() != *receiver) return; |
| 1464 code = isolate()->stub_cache()->ComputeStoreNormal(strict_mode); | 1466 code = isolate()->stub_cache()->ComputeStoreNormal(strict_mode); |
| 1465 } | 1467 } |
| 1466 break; | 1468 break; |
| 1467 case CALLBACKS: { | 1469 case CALLBACKS: { |
| 1468 Handle<Object> callback_object(lookup->GetCallbackObject()); | 1470 Handle<Object> callback_object(lookup->GetCallbackObject()); |
| 1469 if (!callback_object->IsAccessorInfo()) return; | 1471 if (!callback_object->IsAccessorInfo()) return; |
| 1470 Handle<AccessorInfo> callback = | 1472 Handle<AccessorInfo> callback = |
| 1471 Handle<AccessorInfo>::cast(callback_object); | 1473 Handle<AccessorInfo>::cast(callback_object); |
| 1472 if (v8::ToCData<Address>(callback->setter()) == 0) return; | 1474 if (v8::ToCData<Address>(callback->setter()) == 0) return; |
| 1475 ASSERT(callback->IsCompatibleReceiver(*receiver)); |
| 1473 code = isolate()->stub_cache()->ComputeStoreCallback( | 1476 code = isolate()->stub_cache()->ComputeStoreCallback( |
| 1474 name, receiver, callback, strict_mode); | 1477 name, receiver, callback, strict_mode); |
| 1475 break; | 1478 break; |
| 1476 } | 1479 } |
| 1477 case INTERCEPTOR: | 1480 case INTERCEPTOR: |
| 1478 ASSERT(!receiver->GetNamedInterceptor()->setter()->IsUndefined()); | 1481 ASSERT(!receiver->GetNamedInterceptor()->setter()->IsUndefined()); |
| 1479 code = isolate()->stub_cache()->ComputeStoreInterceptor( | 1482 code = isolate()->stub_cache()->ComputeStoreInterceptor( |
| 1480 name, receiver, strict_mode); | 1483 name, receiver, strict_mode); |
| 1481 break; | 1484 break; |
| 1482 case CONSTANT_FUNCTION: | 1485 case CONSTANT_FUNCTION: |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2639 #undef ADDR | 2642 #undef ADDR |
| 2640 }; | 2643 }; |
| 2641 | 2644 |
| 2642 | 2645 |
| 2643 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2646 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2644 return IC_utilities[id]; | 2647 return IC_utilities[id]; |
| 2645 } | 2648 } |
| 2646 | 2649 |
| 2647 | 2650 |
| 2648 } } // namespace v8::internal | 2651 } } // namespace v8::internal |
| OLD | NEW |