| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 __ Mov(this->name(), Operand(name)); | 560 __ Mov(this->name(), Operand(name)); |
| 561 } | 561 } |
| 562 } | 562 } |
| 563 | 563 |
| 564 | 564 |
| 565 static void PushInterceptorArguments(MacroAssembler* masm, | 565 static void PushInterceptorArguments(MacroAssembler* masm, |
| 566 Register receiver, | 566 Register receiver, |
| 567 Register holder, | 567 Register holder, |
| 568 Register name, | 568 Register name, |
| 569 Handle<JSObject> holder_obj) { | 569 Handle<JSObject> holder_obj) { |
| 570 STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0); | 570 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
| 571 STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1); | 571 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); |
| 572 STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2); | 572 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); |
| 573 STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3); | 573 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); |
| 574 STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4); | 574 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); |
| 575 | 575 |
| 576 __ Push(name); | 576 __ Push(name); |
| 577 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | 577 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); |
| 578 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); | 578 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
| 579 Register scratch = name; | 579 Register scratch = name; |
| 580 __ Mov(scratch, Operand(interceptor)); | 580 __ Mov(scratch, Operand(interceptor)); |
| 581 __ Push(scratch, receiver, holder); | 581 __ Push(scratch, receiver, holder); |
| 582 } | 582 } |
| 583 | 583 |
| 584 | 584 |
| 585 static void CompileCallLoadPropertyWithInterceptor( | 585 static void CompileCallLoadPropertyWithInterceptor( |
| 586 MacroAssembler* masm, | 586 MacroAssembler* masm, |
| 587 Register receiver, | 587 Register receiver, |
| 588 Register holder, | 588 Register holder, |
| 589 Register name, | 589 Register name, |
| 590 Handle<JSObject> holder_obj, | 590 Handle<JSObject> holder_obj, |
| 591 IC::UtilityId id) { | 591 IC::UtilityId id) { |
| 592 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 592 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
| 593 | 593 |
| 594 __ CallExternalReference( | 594 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
| 595 ExternalReference(IC_Utility(id), masm->isolate()), | 595 NamedLoadHandlerCompiler::kInterceptorArgsLength); |
| 596 StubCache::kInterceptorArgsLength); | |
| 597 } | 596 } |
| 598 | 597 |
| 599 | 598 |
| 600 // Generate call to api function. | 599 // Generate call to api function. |
| 601 void PropertyHandlerCompiler::GenerateFastApiCall( | 600 void PropertyHandlerCompiler::GenerateFastApiCall( |
| 602 MacroAssembler* masm, const CallOptimization& optimization, | 601 MacroAssembler* masm, const CallOptimization& optimization, |
| 603 Handle<Map> receiver_map, Register receiver, Register scratch, | 602 Handle<Map> receiver_map, Register receiver, Register scratch, |
| 604 bool is_store, int argc, Register* values) { | 603 bool is_store, int argc, Register* values) { |
| 605 ASSERT(!AreAliased(receiver, scratch)); | 604 ASSERT(!AreAliased(receiver, scratch)); |
| 606 | 605 |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); | 1007 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); |
| 1009 } else { // !compile_followup_inline | 1008 } else { // !compile_followup_inline |
| 1010 // Call the runtime system to load the interceptor. | 1009 // Call the runtime system to load the interceptor. |
| 1011 // Check that the maps haven't changed. | 1010 // Check that the maps haven't changed. |
| 1012 PushInterceptorArguments( | 1011 PushInterceptorArguments( |
| 1013 masm(), receiver(), holder_reg, this->name(), interceptor_holder); | 1012 masm(), receiver(), holder_reg, this->name(), interceptor_holder); |
| 1014 | 1013 |
| 1015 ExternalReference ref = | 1014 ExternalReference ref = |
| 1016 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor), | 1015 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor), |
| 1017 isolate()); | 1016 isolate()); |
| 1018 __ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); | 1017 __ TailCallExternalReference( |
| 1018 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
| 1019 } | 1019 } |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 | 1022 |
| 1023 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 1023 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 1024 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, | 1024 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, |
| 1025 Handle<ExecutableAccessorInfo> callback) { | 1025 Handle<ExecutableAccessorInfo> callback) { |
| 1026 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreCallback"); | 1026 ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreCallback"); |
| 1027 Register holder_reg = | 1027 Register holder_reg = |
| 1028 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); | 1028 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |