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