OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 | 1099 |
1100 Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( | 1100 Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( |
1101 Handle<JSObject> object, Handle<Name> name) { | 1101 Handle<JSObject> object, Handle<Name> name) { |
1102 Label miss; | 1102 Label miss; |
1103 | 1103 |
1104 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreInterceptor"); | 1104 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreInterceptor"); |
1105 | 1105 |
1106 __ Push(receiver(), this->name(), value()); | 1106 __ Push(receiver(), this->name(), value()); |
1107 | 1107 |
1108 // Do tail-call to the runtime system. | 1108 // Do tail-call to the runtime system. |
1109 ExternalReference store_ic_property = | 1109 ExternalReference store_ic_property = ExternalReference( |
1110 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); | 1110 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); |
1111 __ TailCallExternalReference(store_ic_property, 3, 1); | 1111 __ TailCallExternalReference(store_ic_property, 3, 1); |
1112 | 1112 |
1113 // Return the generated code. | 1113 // Return the generated code. |
1114 return GetCode(kind(), Code::FAST, name); | 1114 return GetCode(kind(), Code::FAST, name); |
1115 } | 1115 } |
1116 | 1116 |
1117 | 1117 |
1118 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( | 1118 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( |
1119 Handle<HeapType> type, Handle<JSObject> last, Handle<Name> name) { | 1119 Handle<HeapType> type, Handle<JSObject> last, Handle<Name> name) { |
1120 NonexistentFrontend(type, last, name); | 1120 NonexistentFrontend(type, last, name); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 // Prepare tail call to StoreIC_ArrayLength. | 1287 // Prepare tail call to StoreIC_ArrayLength. |
1288 __ Push(receiver(), value()); | 1288 __ Push(receiver(), value()); |
1289 | 1289 |
1290 ExternalReference ref = | 1290 ExternalReference ref = |
1291 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), | 1291 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), |
1292 masm()->isolate()); | 1292 masm()->isolate()); |
1293 __ TailCallExternalReference(ref, 2, 1); | 1293 __ TailCallExternalReference(ref, 2, 1); |
1294 } | 1294 } |
1295 | 1295 |
1296 | 1296 |
1297 Handle<Code> PropertyICCompiler::CompileIndexedStorePolymorphic( | 1297 Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( |
1298 MapHandleList* receiver_maps, CodeHandleList* handler_stubs, | 1298 MapHandleList* receiver_maps, CodeHandleList* handler_stubs, |
1299 MapHandleList* transitioned_maps) { | 1299 MapHandleList* transitioned_maps) { |
1300 Label miss; | 1300 Label miss; |
1301 | 1301 |
1302 ASM_LOCATION("PropertyICCompiler::CompileStorePolymorphic"); | 1302 ASM_LOCATION("PropertyICCompiler::CompileStorePolymorphic"); |
1303 | 1303 |
1304 __ JumpIfSmi(receiver(), &miss); | 1304 __ JumpIfSmi(receiver(), &miss); |
1305 | 1305 |
1306 int receiver_count = receiver_maps->length(); | 1306 int receiver_count = receiver_maps->length(); |
1307 __ Ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); | 1307 __ Ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
(...skipping 14 matching lines...) Expand all Loading... |
1322 __ Bind(&miss); | 1322 __ Bind(&miss); |
1323 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1323 TailCallBuiltin(masm(), MissBuiltin(kind())); |
1324 | 1324 |
1325 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 1325 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
1326 } | 1326 } |
1327 | 1327 |
1328 | 1328 |
1329 #undef __ | 1329 #undef __ |
1330 #define __ ACCESS_MASM(masm) | 1330 #define __ ACCESS_MASM(masm) |
1331 | 1331 |
1332 void IndexedHandlerCompiler::GenerateLoadDictionaryElement( | 1332 void ElementHandlerCompiler::GenerateLoadDictionaryElement( |
1333 MacroAssembler* masm) { | 1333 MacroAssembler* masm) { |
1334 // The return address is in lr. | 1334 // The return address is in lr. |
1335 Label slow, miss; | 1335 Label slow, miss; |
1336 | 1336 |
1337 Register result = x0; | 1337 Register result = x0; |
1338 Register key = LoadIC::NameRegister(); | 1338 Register key = LoadIC::NameRegister(); |
1339 Register receiver = LoadIC::ReceiverRegister(); | 1339 Register receiver = LoadIC::ReceiverRegister(); |
1340 ASSERT(receiver.is(x1)); | 1340 ASSERT(receiver.is(x1)); |
1341 ASSERT(key.is(x2)); | 1341 ASSERT(key.is(x2)); |
1342 | 1342 |
1343 __ JumpIfNotSmi(key, &miss); | 1343 __ JumpIfNotSmi(key, &miss); |
1344 __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 1344 __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
1345 __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6); | 1345 __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6); |
1346 __ Ret(); | 1346 __ Ret(); |
1347 | 1347 |
1348 __ Bind(&slow); | 1348 __ Bind(&slow); |
1349 __ IncrementCounter( | 1349 __ IncrementCounter( |
1350 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, x4, x3); | 1350 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, x4, x3); |
1351 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); | 1351 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); |
1352 | 1352 |
1353 // Miss case, call the runtime. | 1353 // Miss case, call the runtime. |
1354 __ Bind(&miss); | 1354 __ Bind(&miss); |
1355 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1355 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1356 } | 1356 } |
1357 | 1357 |
1358 | 1358 |
1359 } } // namespace v8::internal | 1359 } } // namespace v8::internal |
1360 | 1360 |
1361 #endif // V8_TARGET_ARCH_ARM64 | 1361 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |