OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/ic.h" | 5 #include "src/ic/ic.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 DCHECK(UseVector()); | 877 DCHECK(UseVector()); |
878 vector_set_ = true; | 878 vector_set_ = true; |
879 break; | 879 break; |
880 case GENERIC: | 880 case GENERIC: |
881 UNREACHABLE(); | 881 UNREACHABLE(); |
882 break; | 882 break; |
883 } | 883 } |
884 } | 884 } |
885 | 885 |
886 Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) { | 886 Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) { |
887 if (FLAG_tf_load_ic_stub) { | 887 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH); |
888 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH); | 888 return LoadHandler::LoadField(isolate(), index); |
889 return LoadHandler::LoadField(isolate(), index); | |
890 } | |
891 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldStub); | |
892 LoadFieldStub stub(isolate(), index); | |
893 return stub.GetCode(); | |
894 } | 889 } |
895 | 890 |
896 namespace { | 891 namespace { |
897 | 892 |
898 template <bool fill_array = true> | 893 template <bool fill_array = true> |
899 int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map, | 894 int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map, |
900 Handle<JSObject> holder, Handle<Name> name, | 895 Handle<JSObject> holder, Handle<Name> name, |
901 Handle<FixedArray> array, int first_index) { | 896 Handle<FixedArray> array, int first_index) { |
902 DCHECK(holder.is_null() || holder->HasFastProperties()); | 897 DCHECK(holder.is_null() || holder->HasFastProperties()); |
903 | 898 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 TRACE_IC("LoadIC", lookup->name()); | 1109 TRACE_IC("LoadIC", lookup->name()); |
1115 return; | 1110 return; |
1116 } | 1111 } |
1117 | 1112 |
1118 Handle<Object> code; | 1113 Handle<Object> code; |
1119 if (lookup->state() == LookupIterator::JSPROXY || | 1114 if (lookup->state() == LookupIterator::JSPROXY || |
1120 lookup->state() == LookupIterator::ACCESS_CHECK) { | 1115 lookup->state() == LookupIterator::ACCESS_CHECK) { |
1121 code = slow_stub(); | 1116 code = slow_stub(); |
1122 } else if (!lookup->IsFound()) { | 1117 } else if (!lookup->IsFound()) { |
1123 if (kind() == Code::LOAD_IC || kind() == Code::LOAD_GLOBAL_IC) { | 1118 if (kind() == Code::LOAD_IC || kind() == Code::LOAD_GLOBAL_IC) { |
1124 if (FLAG_tf_load_ic_stub) { | 1119 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadNonexistentDH); |
1125 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadNonexistentDH); | 1120 code = LoadNonExistent(receiver_map(), lookup->name()); |
1126 code = LoadNonExistent(receiver_map(), lookup->name()); | |
1127 } else { | |
1128 code = NamedLoadHandlerCompiler::ComputeLoadNonexistent(lookup->name(), | |
1129 receiver_map()); | |
1130 // TODO(jkummerow/verwaest): Introduce a builtin that handles this case. | |
1131 if (code.is_null()) code = slow_stub(); | |
1132 } | |
1133 } else { | 1121 } else { |
1134 code = slow_stub(); | 1122 code = slow_stub(); |
1135 } | 1123 } |
1136 } else { | 1124 } else { |
1137 if (kind() == Code::LOAD_GLOBAL_IC && | 1125 if (kind() == Code::LOAD_GLOBAL_IC && |
1138 lookup->state() == LookupIterator::DATA && | 1126 lookup->state() == LookupIterator::DATA && |
1139 lookup->GetReceiver().is_identical_to(lookup->GetHolder<Object>())) { | 1127 lookup->GetReceiver().is_identical_to(lookup->GetHolder<Object>())) { |
1140 DCHECK(lookup->GetReceiver()->IsJSGlobalObject()); | 1128 DCHECK(lookup->GetReceiver()->IsJSGlobalObject()); |
1141 // Now update the cell in the feedback vector. | 1129 // Now update the cell in the feedback vector. |
1142 LoadGlobalICNexus* nexus = casted_nexus<LoadGlobalICNexus>(); | 1130 LoadGlobalICNexus* nexus = casted_nexus<LoadGlobalICNexus>(); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 return slow_stub(); | 1371 return slow_stub(); |
1384 } | 1372 } |
1385 // Ruled out by IsCompatibleReceiver() above. | 1373 // Ruled out by IsCompatibleReceiver() above. |
1386 DCHECK(AccessorInfo::IsCompatibleReceiverMap(isolate(), info, map)); | 1374 DCHECK(AccessorInfo::IsCompatibleReceiverMap(isolate(), info, map)); |
1387 if (!holder->HasFastProperties() || | 1375 if (!holder->HasFastProperties() || |
1388 (info->is_sloppy() && !receiver->IsJSReceiver())) { | 1376 (info->is_sloppy() && !receiver->IsJSReceiver())) { |
1389 DCHECK(!holder->HasFastProperties() || !receiver_is_holder); | 1377 DCHECK(!holder->HasFastProperties() || !receiver_is_holder); |
1390 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); | 1378 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); |
1391 return slow_stub(); | 1379 return slow_stub(); |
1392 } | 1380 } |
1393 if (FLAG_tf_load_ic_stub) { | 1381 Handle<Object> smi_handler = |
1394 Handle<Object> smi_handler = LoadHandler::LoadApiGetter( | 1382 LoadHandler::LoadApiGetter(isolate(), lookup->GetAccessorIndex()); |
1395 isolate(), lookup->GetAccessorIndex()); | 1383 if (receiver_is_holder) { |
1396 if (receiver_is_holder) { | 1384 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterDH); |
1397 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterDH); | 1385 return smi_handler; |
1398 return smi_handler; | 1386 } |
1399 } | 1387 if (kind() != Code::LOAD_GLOBAL_IC) { |
1400 if (kind() != Code::LOAD_GLOBAL_IC) { | 1388 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterFromPrototypeDH); |
1401 TRACE_HANDLER_STATS(isolate(), | 1389 return LoadFromPrototype(map, holder, lookup->name(), smi_handler); |
1402 LoadIC_LoadApiGetterFromPrototypeDH); | |
1403 return LoadFromPrototype(map, holder, lookup->name(), | |
1404 smi_handler); | |
1405 } | |
1406 } else { | |
1407 if (receiver_is_holder) { | |
1408 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterStub); | |
1409 int index = lookup->GetAccessorIndex(); | |
1410 LoadApiGetterStub stub(isolate(), true, index); | |
1411 return stub.GetCode(); | |
1412 } | |
1413 } | 1390 } |
1414 break; // Custom-compiled handler. | 1391 break; // Custom-compiled handler. |
1415 } | 1392 } |
1416 } | 1393 } |
1417 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); | 1394 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); |
1418 return slow_stub(); | 1395 return slow_stub(); |
1419 } | 1396 } |
1420 | 1397 |
1421 case LookupIterator::DATA: { | 1398 case LookupIterator::DATA: { |
1422 if (lookup->is_dictionary_holder()) { | 1399 if (lookup->is_dictionary_holder()) { |
(...skipping 16 matching lines...) Expand all Loading... |
1439 return isolate()->builtins()->LoadIC_Normal(); | 1416 return isolate()->builtins()->LoadIC_Normal(); |
1440 } | 1417 } |
1441 | 1418 |
1442 // -------------- Fields -------------- | 1419 // -------------- Fields -------------- |
1443 if (lookup->property_details().type() == DATA) { | 1420 if (lookup->property_details().type() == DATA) { |
1444 FieldIndex field = lookup->GetFieldIndex(); | 1421 FieldIndex field = lookup->GetFieldIndex(); |
1445 Handle<Object> smi_handler = SimpleFieldLoad(field); | 1422 Handle<Object> smi_handler = SimpleFieldLoad(field); |
1446 if (receiver_is_holder) { | 1423 if (receiver_is_holder) { |
1447 return smi_handler; | 1424 return smi_handler; |
1448 } | 1425 } |
1449 if (FLAG_tf_load_ic_stub) { | 1426 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldFromPrototypeDH); |
1450 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldFromPrototypeDH); | 1427 return LoadFromPrototype(map, holder, lookup->name(), smi_handler); |
1451 return LoadFromPrototype(map, holder, lookup->name(), smi_handler); | |
1452 } | |
1453 break; // Custom-compiled handler. | |
1454 } | 1428 } |
1455 | 1429 |
1456 // -------------- Constant properties -------------- | 1430 // -------------- Constant properties -------------- |
1457 DCHECK(lookup->property_details().type() == DATA_CONSTANT); | 1431 DCHECK(lookup->property_details().type() == DATA_CONSTANT); |
1458 if (FLAG_tf_load_ic_stub) { | 1432 Handle<Object> smi_handler = |
1459 Handle<Object> smi_handler = | 1433 LoadHandler::LoadConstant(isolate(), lookup->GetConstantIndex()); |
1460 LoadHandler::LoadConstant(isolate(), lookup->GetConstantIndex()); | 1434 if (receiver_is_holder) { |
1461 if (receiver_is_holder) { | 1435 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantDH); |
1462 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantDH); | 1436 return smi_handler; |
1463 return smi_handler; | |
1464 } | |
1465 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantFromPrototypeDH); | |
1466 return LoadFromPrototype(map, holder, lookup->name(), smi_handler); | |
1467 } else { | |
1468 if (receiver_is_holder) { | |
1469 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantStub); | |
1470 LoadConstantStub stub(isolate(), lookup->GetConstantIndex()); | |
1471 return stub.GetCode(); | |
1472 } | |
1473 } | 1437 } |
1474 break; // Custom-compiled handler. | 1438 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantFromPrototypeDH); |
| 1439 return LoadFromPrototype(map, holder, lookup->name(), smi_handler); |
1475 } | 1440 } |
1476 | 1441 |
1477 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 1442 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
1478 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); | 1443 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); |
1479 return slow_stub(); | 1444 return slow_stub(); |
1480 case LookupIterator::ACCESS_CHECK: | 1445 case LookupIterator::ACCESS_CHECK: |
1481 case LookupIterator::JSPROXY: | 1446 case LookupIterator::JSPROXY: |
1482 case LookupIterator::NOT_FOUND: | 1447 case LookupIterator::NOT_FOUND: |
1483 case LookupIterator::TRANSITION: | 1448 case LookupIterator::TRANSITION: |
1484 UNREACHABLE(); | 1449 UNREACHABLE(); |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 if (store_target->IsJSGlobalObject()) { | 1969 if (store_target->IsJSGlobalObject()) { |
2005 break; // Custom-compiled handler. | 1970 break; // Custom-compiled handler. |
2006 } | 1971 } |
2007 // Currently not handled by CompileStoreTransition. | 1972 // Currently not handled by CompileStoreTransition. |
2008 if (!holder->HasFastProperties()) { | 1973 if (!holder->HasFastProperties()) { |
2009 TRACE_GENERIC_IC(isolate(), "StoreIC", "transition from slow"); | 1974 TRACE_GENERIC_IC(isolate(), "StoreIC", "transition from slow"); |
2010 TRACE_HANDLER_STATS(isolate(), StoreIC_SlowStub); | 1975 TRACE_HANDLER_STATS(isolate(), StoreIC_SlowStub); |
2011 return slow_stub(); | 1976 return slow_stub(); |
2012 } | 1977 } |
2013 DCHECK(lookup->IsCacheableTransition()); | 1978 DCHECK(lookup->IsCacheableTransition()); |
2014 if (FLAG_tf_store_ic_stub) { | 1979 Handle<Map> transition = lookup->transition_map(); |
2015 Handle<Map> transition = lookup->transition_map(); | 1980 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransitionDH); |
2016 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransitionDH); | 1981 return StoreTransition(receiver_map(), holder, transition, |
2017 return StoreTransition(receiver_map(), holder, transition, | 1982 lookup->name()); |
2018 lookup->name()); | |
2019 } | |
2020 break; // Custom-compiled handler. | |
2021 } | 1983 } |
2022 | 1984 |
2023 case LookupIterator::INTERCEPTOR: { | 1985 case LookupIterator::INTERCEPTOR: { |
2024 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined(isolate())); | 1986 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined(isolate())); |
2025 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreInterceptorStub); | 1987 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreInterceptorStub); |
2026 StoreInterceptorStub stub(isolate()); | 1988 StoreInterceptorStub stub(isolate()); |
2027 return stub.GetCode(); | 1989 return stub.GetCode(); |
2028 } | 1990 } |
2029 | 1991 |
2030 case LookupIterator::ACCESSOR: { | 1992 case LookupIterator::ACCESSOR: { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 if (holder->IsJSGlobalObject()) { | 2049 if (holder->IsJSGlobalObject()) { |
2088 break; // Custom-compiled handler. | 2050 break; // Custom-compiled handler. |
2089 } | 2051 } |
2090 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreNormal); | 2052 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreNormal); |
2091 DCHECK(holder.is_identical_to(receiver)); | 2053 DCHECK(holder.is_identical_to(receiver)); |
2092 return isolate()->builtins()->StoreIC_Normal(); | 2054 return isolate()->builtins()->StoreIC_Normal(); |
2093 } | 2055 } |
2094 | 2056 |
2095 // -------------- Fields -------------- | 2057 // -------------- Fields -------------- |
2096 if (lookup->property_details().type() == DATA) { | 2058 if (lookup->property_details().type() == DATA) { |
2097 if (FLAG_tf_store_ic_stub) { | 2059 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldDH); |
2098 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldDH); | 2060 int descriptor = lookup->GetFieldDescriptorIndex(); |
2099 int descriptor = lookup->GetFieldDescriptorIndex(); | 2061 FieldIndex index = lookup->GetFieldIndex(); |
2100 FieldIndex index = lookup->GetFieldIndex(); | 2062 return StoreHandler::StoreField(isolate(), descriptor, index, |
2101 return StoreHandler::StoreField(isolate(), descriptor, index, | 2063 lookup->representation()); |
2102 lookup->representation()); | |
2103 } else { | |
2104 bool use_stub = true; | |
2105 if (lookup->representation().IsHeapObject()) { | |
2106 // Only use a generic stub if no types need to be tracked. | |
2107 Handle<FieldType> field_type = lookup->GetFieldType(); | |
2108 use_stub = !field_type->IsClass(); | |
2109 } | |
2110 if (use_stub) { | |
2111 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldStub); | |
2112 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(), | |
2113 lookup->representation()); | |
2114 return stub.GetCode(); | |
2115 } | |
2116 } | |
2117 break; // Custom-compiled handler. | |
2118 } | 2064 } |
2119 | 2065 |
2120 // -------------- Constant properties -------------- | 2066 // -------------- Constant properties -------------- |
2121 DCHECK(lookup->property_details().type() == DATA_CONSTANT); | 2067 DCHECK(lookup->property_details().type() == DATA_CONSTANT); |
2122 TRACE_GENERIC_IC(isolate(), "StoreIC", "constant property"); | 2068 TRACE_GENERIC_IC(isolate(), "StoreIC", "constant property"); |
2123 TRACE_HANDLER_STATS(isolate(), StoreIC_SlowStub); | 2069 TRACE_HANDLER_STATS(isolate(), StoreIC_SlowStub); |
2124 return slow_stub(); | 2070 return slow_stub(); |
2125 } | 2071 } |
2126 | 2072 |
2127 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 2073 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
(...skipping 21 matching lines...) Expand all Loading... |
2149 if (store_target->IsJSGlobalObject()) { | 2095 if (store_target->IsJSGlobalObject()) { |
2150 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition); | 2096 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition); |
2151 Handle<PropertyCell> cell = lookup->transition_cell(); | 2097 Handle<PropertyCell> cell = lookup->transition_cell(); |
2152 cell->set_value(*value); | 2098 cell->set_value(*value); |
2153 Handle<Code> code = PropertyCellStoreHandler( | 2099 Handle<Code> code = PropertyCellStoreHandler( |
2154 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), | 2100 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), |
2155 lookup->name(), cell, PropertyCellType::kConstant); | 2101 lookup->name(), cell, PropertyCellType::kConstant); |
2156 cell->set_value(isolate()->heap()->the_hole_value()); | 2102 cell->set_value(isolate()->heap()->the_hole_value()); |
2157 return code; | 2103 return code; |
2158 } | 2104 } |
2159 DCHECK(!FLAG_tf_store_ic_stub); | 2105 UNREACHABLE(); |
2160 Handle<Map> transition = lookup->transition_map(); | |
2161 // Currently not handled by CompileStoreTransition. | |
2162 DCHECK(holder->HasFastProperties()); | |
2163 | |
2164 DCHECK(lookup->IsCacheableTransition()); | |
2165 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransition); | |
2166 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | |
2167 return compiler.CompileStoreTransition(transition, lookup->name()); | |
2168 } | 2106 } |
2169 | 2107 |
2170 case LookupIterator::INTERCEPTOR: | 2108 case LookupIterator::INTERCEPTOR: |
2171 UNREACHABLE(); | 2109 UNREACHABLE(); |
2172 | 2110 |
2173 case LookupIterator::ACCESSOR: { | 2111 case LookupIterator::ACCESSOR: { |
2174 DCHECK(holder->HasFastProperties()); | 2112 DCHECK(holder->HasFastProperties()); |
2175 Handle<Object> accessors = lookup->GetAccessors(); | 2113 Handle<Object> accessors = lookup->GetAccessors(); |
2176 if (accessors->IsAccessorInfo()) { | 2114 if (accessors->IsAccessorInfo()) { |
2177 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); | 2115 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); |
(...skipping 27 matching lines...) Expand all Loading... |
2205 int expected_arguments = JSFunction::cast(*setter) | 2143 int expected_arguments = JSFunction::cast(*setter) |
2206 ->shared() | 2144 ->shared() |
2207 ->internal_formal_parameter_count(); | 2145 ->internal_formal_parameter_count(); |
2208 return compiler.CompileStoreViaSetter(receiver, lookup->name(), | 2146 return compiler.CompileStoreViaSetter(receiver, lookup->name(), |
2209 lookup->GetAccessorIndex(), | 2147 lookup->GetAccessorIndex(), |
2210 expected_arguments); | 2148 expected_arguments); |
2211 } | 2149 } |
2212 } | 2150 } |
2213 | 2151 |
2214 case LookupIterator::DATA: { | 2152 case LookupIterator::DATA: { |
2215 if (lookup->is_dictionary_holder()) { | 2153 DCHECK(lookup->is_dictionary_holder()); |
2216 DCHECK(holder->IsJSGlobalObject()); | 2154 DCHECK(holder->IsJSGlobalObject()); |
2217 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobal); | 2155 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobal); |
2218 DCHECK(holder.is_identical_to(receiver) || | 2156 DCHECK(holder.is_identical_to(receiver) || |
2219 receiver->map()->prototype() == *holder); | 2157 receiver->map()->prototype() == *holder); |
2220 auto cell = lookup->GetPropertyCell(); | 2158 auto cell = lookup->GetPropertyCell(); |
2221 auto updated_type = | 2159 auto updated_type = |
2222 PropertyCell::UpdatedType(cell, value, lookup->property_details()); | 2160 PropertyCell::UpdatedType(cell, value, lookup->property_details()); |
2223 auto code = PropertyCellStoreHandler( | 2161 auto code = PropertyCellStoreHandler(isolate(), receiver, |
2224 isolate(), receiver, Handle<JSGlobalObject>::cast(holder), | 2162 Handle<JSGlobalObject>::cast(holder), |
2225 lookup->name(), cell, updated_type); | 2163 lookup->name(), cell, updated_type); |
2226 return code; | 2164 return code; |
2227 } | |
2228 | |
2229 // -------------- Fields -------------- | |
2230 if (lookup->property_details().type() == DATA) { | |
2231 DCHECK(!FLAG_tf_store_ic_stub); | |
2232 #ifdef DEBUG | |
2233 bool use_stub = true; | |
2234 if (lookup->representation().IsHeapObject()) { | |
2235 // Only use a generic stub if no types need to be tracked. | |
2236 Handle<FieldType> field_type = lookup->GetFieldType(); | |
2237 use_stub = !field_type->IsClass(); | |
2238 } | |
2239 DCHECK(!use_stub); | |
2240 #endif | |
2241 TRACE_HANDLER_STATS(isolate(), StoreIC_StoreField); | |
2242 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | |
2243 return compiler.CompileStoreField(lookup); | |
2244 } | |
2245 | |
2246 // -------------- Constant properties -------------- | |
2247 DCHECK(lookup->property_details().type() == DATA_CONSTANT); | |
2248 UNREACHABLE(); | |
2249 } | 2165 } |
2250 | 2166 |
2251 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 2167 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
2252 case LookupIterator::ACCESS_CHECK: | 2168 case LookupIterator::ACCESS_CHECK: |
2253 case LookupIterator::JSPROXY: | 2169 case LookupIterator::JSPROXY: |
2254 case LookupIterator::NOT_FOUND: | 2170 case LookupIterator::NOT_FOUND: |
2255 UNREACHABLE(); | 2171 UNREACHABLE(); |
2256 } | 2172 } |
2257 UNREACHABLE(); | 2173 UNREACHABLE(); |
2258 return slow_stub(); | 2174 return slow_stub(); |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3317 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3233 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3318 it.Next(); | 3234 it.Next(); |
3319 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3235 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3320 Object::GetProperty(&it)); | 3236 Object::GetProperty(&it)); |
3321 } | 3237 } |
3322 | 3238 |
3323 return *result; | 3239 return *result; |
3324 } | 3240 } |
3325 } // namespace internal | 3241 } // namespace internal |
3326 } // namespace v8 | 3242 } // namespace v8 |
OLD | NEW |