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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 __ ld(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); | 202 __ ld(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); |
203 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 203 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
204 __ Branch(miss, ne, scratch, Operand(at)); | 204 __ Branch(miss, ne, scratch, Operand(at)); |
205 } | 205 } |
206 | 206 |
207 | 207 |
208 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 208 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
209 Register holder, Register name, | 209 Register holder, Register name, |
210 Handle<JSObject> holder_obj) { | 210 Handle<JSObject> holder_obj) { |
211 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); | 211 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
212 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); | 212 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
213 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); | 213 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
214 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); | 214 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3); |
215 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); | 215 __ Push(name, receiver, holder); |
216 __ push(name); | |
217 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | |
218 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor)); | |
219 Register scratch = name; | |
220 __ li(scratch, Operand(interceptor)); | |
221 __ Push(scratch, receiver, holder); | |
222 } | 216 } |
223 | 217 |
224 | 218 |
225 static void CompileCallLoadPropertyWithInterceptor( | 219 static void CompileCallLoadPropertyWithInterceptor( |
226 MacroAssembler* masm, Register receiver, Register holder, Register name, | 220 MacroAssembler* masm, Register receiver, Register holder, Register name, |
227 Handle<JSObject> holder_obj, IC::UtilityId id) { | 221 Handle<JSObject> holder_obj, IC::UtilityId id) { |
228 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 222 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
229 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), | 223 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
230 NamedLoadHandlerCompiler::kInterceptorArgsLength); | 224 NamedLoadHandlerCompiler::kInterceptorArgsLength); |
231 } | 225 } |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 // Return the generated code. | 734 // Return the generated code. |
741 return GetCode(kind(), Code::NORMAL, name); | 735 return GetCode(kind(), Code::NORMAL, name); |
742 } | 736 } |
743 | 737 |
744 | 738 |
745 #undef __ | 739 #undef __ |
746 } | 740 } |
747 } // namespace v8::internal | 741 } // namespace v8::internal |
748 | 742 |
749 #endif // V8_TARGET_ARCH_MIPS64 | 743 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |