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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 __ li(this->name(), Operand(name)); | 605 __ li(this->name(), Operand(name)); |
606 } | 606 } |
607 } | 607 } |
608 | 608 |
609 | 609 |
610 static void PushInterceptorArguments(MacroAssembler* masm, | 610 static void PushInterceptorArguments(MacroAssembler* masm, |
611 Register receiver, | 611 Register receiver, |
612 Register holder, | 612 Register holder, |
613 Register name, | 613 Register name, |
614 Handle<JSObject> holder_obj) { | 614 Handle<JSObject> holder_obj) { |
615 STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0); | 615 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
616 STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1); | 616 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); |
617 STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2); | 617 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); |
618 STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3); | 618 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); |
619 STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4); | 619 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); |
620 __ push(name); | 620 __ push(name); |
621 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | 621 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); |
622 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); | 622 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); |
623 Register scratch = name; | 623 Register scratch = name; |
624 __ li(scratch, Operand(interceptor)); | 624 __ li(scratch, Operand(interceptor)); |
625 __ Push(scratch, receiver, holder); | 625 __ Push(scratch, receiver, holder); |
626 } | 626 } |
627 | 627 |
628 | 628 |
629 static void CompileCallLoadPropertyWithInterceptor( | 629 static void CompileCallLoadPropertyWithInterceptor( |
630 MacroAssembler* masm, | 630 MacroAssembler* masm, |
631 Register receiver, | 631 Register receiver, |
632 Register holder, | 632 Register holder, |
633 Register name, | 633 Register name, |
634 Handle<JSObject> holder_obj, | 634 Handle<JSObject> holder_obj, |
635 IC::UtilityId id) { | 635 IC::UtilityId id) { |
636 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 636 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
637 __ CallExternalReference( | 637 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
638 ExternalReference(IC_Utility(id), masm->isolate()), | 638 NamedLoadHandlerCompiler::kInterceptorArgsLength); |
639 StubCache::kInterceptorArgsLength); | |
640 } | 639 } |
641 | 640 |
642 | 641 |
643 // Generate call to api function. | 642 // Generate call to api function. |
644 void PropertyHandlerCompiler::GenerateFastApiCall( | 643 void PropertyHandlerCompiler::GenerateFastApiCall( |
645 MacroAssembler* masm, const CallOptimization& optimization, | 644 MacroAssembler* masm, const CallOptimization& optimization, |
646 Handle<Map> receiver_map, Register receiver, Register scratch_in, | 645 Handle<Map> receiver_map, Register receiver, Register scratch_in, |
647 bool is_store, int argc, Register* values) { | 646 bool is_store, int argc, Register* values) { |
648 ASSERT(!receiver.is(scratch_in)); | 647 ASSERT(!receiver.is(scratch_in)); |
649 // Preparing to push, adjust sp. | 648 // Preparing to push, adjust sp. |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 } | 1037 } |
1039 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); | 1038 GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); |
1040 } else { // !compile_followup_inline | 1039 } else { // !compile_followup_inline |
1041 // Call the runtime system to load the interceptor. | 1040 // Call the runtime system to load the interceptor. |
1042 // Check that the maps haven't changed. | 1041 // Check that the maps haven't changed. |
1043 PushInterceptorArguments(masm(), receiver(), holder_reg, | 1042 PushInterceptorArguments(masm(), receiver(), holder_reg, |
1044 this->name(), interceptor_holder); | 1043 this->name(), interceptor_holder); |
1045 | 1044 |
1046 ExternalReference ref = ExternalReference( | 1045 ExternalReference ref = ExternalReference( |
1047 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); | 1046 IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); |
1048 __ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); | 1047 __ TailCallExternalReference( |
| 1048 ref, NamedLoadHandlerCompiler::kInterceptorArgsLength, 1); |
1049 } | 1049 } |
1050 } | 1050 } |
1051 | 1051 |
1052 | 1052 |
1053 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 1053 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
1054 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, | 1054 Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, |
1055 Handle<ExecutableAccessorInfo> callback) { | 1055 Handle<ExecutableAccessorInfo> callback) { |
1056 Register holder_reg = | 1056 Register holder_reg = |
1057 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); | 1057 Frontend(IC::CurrentTypeOf(object, isolate()), receiver(), holder, name); |
1058 | 1058 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 | 1381 |
1382 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1382 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1383 } | 1383 } |
1384 | 1384 |
1385 | 1385 |
1386 #undef __ | 1386 #undef __ |
1387 | 1387 |
1388 } } // namespace v8::internal | 1388 } } // namespace v8::internal |
1389 | 1389 |
1390 #endif // V8_TARGET_ARCH_MIPS64 | 1390 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |