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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 __ mov(this->name(), Operand(name)); | 612 __ mov(this->name(), Operand(name)); |
613 } | 613 } |
614 } | 614 } |
615 | 615 |
616 | 616 |
617 static void PushInterceptorArguments(MacroAssembler* masm, | 617 static void PushInterceptorArguments(MacroAssembler* masm, |
618 Register receiver, | 618 Register receiver, |
619 Register holder, | 619 Register holder, |
620 Register name, | 620 Register name, |
621 Handle<JSObject> holder_obj) { | 621 Handle<JSObject> holder_obj) { |
622 STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0); | 622 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
623 STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1); | 623 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); |
624 STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2); | 624 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); |
625 STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3); | 625 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); |
626 STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4); | 626 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); |
627 __ push(name); | 627 __ push(name); |
628 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | 628 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); |
629 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); | 629 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
630 Register scratch = name; | 630 Register scratch = name; |
631 __ mov(scratch, Operand(interceptor)); | 631 __ mov(scratch, Operand(interceptor)); |
632 __ push(scratch); | 632 __ push(scratch); |
633 __ push(receiver); | 633 __ push(receiver); |
634 __ push(holder); | 634 __ push(holder); |
635 } | 635 } |
636 | 636 |
637 | 637 |
638 static void CompileCallLoadPropertyWithInterceptor( | 638 static void CompileCallLoadPropertyWithInterceptor( |
639 MacroAssembler* masm, | 639 MacroAssembler* masm, |
640 Register receiver, | 640 Register receiver, |
641 Register holder, | 641 Register holder, |
642 Register name, | 642 Register name, |
643 Handle<JSObject> holder_obj, | 643 Handle<JSObject> holder_obj, |
644 IC::UtilityId id) { | 644 IC::UtilityId id) { |
645 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 645 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
646 __ CallExternalReference( | 646 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
647 ExternalReference(IC_Utility(id), masm->isolate()), | 647 NamedLoadHandlerCompiler::kInterceptorArgsLength); |
648 StubCache::kInterceptorArgsLength); | |
649 } | 648 } |
650 | 649 |
651 | 650 |
652 // Generate call to api function. | 651 // Generate call to api function. |
653 void PropertyHandlerCompiler::GenerateFastApiCall( | 652 void PropertyHandlerCompiler::GenerateFastApiCall( |
654 MacroAssembler* masm, const CallOptimization& optimization, | 653 MacroAssembler* masm, const CallOptimization& optimization, |
655 Handle<Map> receiver_map, Register receiver, Register scratch_in, | 654 Handle<Map> receiver_map, Register receiver, Register scratch_in, |
656 bool is_store, int argc, Register* values) { | 655 bool is_store, int argc, Register* values) { |
657 ASSERT(!receiver.is(scratch_in)); | 656 ASSERT(!receiver.is(scratch_in)); |
658 __ push(receiver); | 657 __ push(receiver); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); | 1045 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); |
1047 } else { // !compile_followup_inline | 1046 } else { // !compile_followup_inline |
1048 // Call the runtime system to load the interceptor. | 1047 // Call the runtime system to load the interceptor. |
1049 // Check that the maps haven't changed. | 1048 // Check that the maps haven't changed. |
1050 PushInterceptorArguments(masm(), receiver(), holder_reg, | 1049 PushInterceptorArguments(masm(), receiver(), holder_reg, |
1051 this->name(), interceptor_holder); | 1050 this->name(), interceptor_holder); |
1052 | 1051 |
1053 ExternalReference ref = | 1052 ExternalReference ref = |
1054 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor), | 1053 ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptor), |
1055 isolate()); | 1054 isolate()); |
1056 __ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); | 1055 __ TailCallExternalReference( |
| 1056 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
1057 } | 1057 } |
1058 } | 1058 } |
1059 | 1059 |
1060 | 1060 |
1061 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 1061 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
1062 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, | 1062 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, |
1063 Handle<ExecutableAccessorInfo> callback) { | 1063 Handle<ExecutableAccessorInfo> callback) { |
1064 Register holder_reg = | 1064 Register holder_reg = |
1065 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); | 1065 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); |
1066 | 1066 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 | 1387 |
1388 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1388 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1389 } | 1389 } |
1390 | 1390 |
1391 | 1391 |
1392 #undef __ | 1392 #undef __ |
1393 | 1393 |
1394 } } // namespace v8::internal | 1394 } } // namespace v8::internal |
1395 | 1395 |
1396 #endif // V8_TARGET_ARCH_ARM | 1396 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |