OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 __ Mov(scratch, Operand(cell)); | 114 __ Mov(scratch, Operand(cell)); |
115 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); | 115 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); |
116 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); | 116 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); |
117 } | 117 } |
118 | 118 |
119 | 119 |
120 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 120 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
121 Register holder, Register name, | 121 Register holder, Register name, |
122 Handle<JSObject> holder_obj) { | 122 Handle<JSObject> holder_obj) { |
123 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); | 123 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); | 124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); | 125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
126 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); | 126 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3); |
127 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); | |
128 | 127 |
129 __ Push(name); | 128 __ Push(name, receiver, holder); |
130 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | |
131 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor)); | |
132 Register scratch = name; | |
133 __ Mov(scratch, Operand(interceptor)); | |
134 __ Push(scratch, receiver, holder); | |
135 } | 129 } |
136 | 130 |
137 | 131 |
138 static void CompileCallLoadPropertyWithInterceptor( | 132 static void CompileCallLoadPropertyWithInterceptor( |
139 MacroAssembler* masm, Register receiver, Register holder, Register name, | 133 MacroAssembler* masm, Register receiver, Register holder, Register name, |
140 Handle<JSObject> holder_obj, IC::UtilityId id) { | 134 Handle<JSObject> holder_obj, IC::UtilityId id) { |
141 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 135 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
142 | 136 |
143 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), | 137 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
144 NamedLoadHandlerCompiler::kInterceptorArgsLength); | 138 NamedLoadHandlerCompiler::kInterceptorArgsLength); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 // Return the generated code. | 756 // Return the generated code. |
763 return GetCode(kind(), Code::FAST, name); | 757 return GetCode(kind(), Code::FAST, name); |
764 } | 758 } |
765 | 759 |
766 | 760 |
767 #undef __ | 761 #undef __ |
768 } | 762 } |
769 } // namespace v8::internal | 763 } // namespace v8::internal |
770 | 764 |
771 #endif // V8_TARGET_ARCH_IA32 | 765 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |