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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 282 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
283 } | 283 } |
284 __ ret(0); | 284 __ ret(0); |
285 } | 285 } |
286 | 286 |
287 | 287 |
288 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 288 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
289 Register holder, Register name, | 289 Register holder, Register name, |
290 Handle<JSObject> holder_obj) { | 290 Handle<JSObject> holder_obj) { |
291 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); | 291 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
292 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); | 292 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
293 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); | 293 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
294 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); | 294 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3); |
295 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); | |
296 __ push(name); | 295 __ push(name); |
297 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); | |
298 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor)); | |
299 Register scratch = name; | |
300 __ mov(scratch, Immediate(interceptor)); | |
301 __ push(scratch); | |
302 __ push(receiver); | 296 __ push(receiver); |
303 __ push(holder); | 297 __ push(holder); |
304 } | 298 } |
305 | 299 |
306 | 300 |
307 static void CompileCallLoadPropertyWithInterceptor( | 301 static void CompileCallLoadPropertyWithInterceptor( |
308 MacroAssembler* masm, Register receiver, Register holder, Register name, | 302 MacroAssembler* masm, Register receiver, Register holder, Register name, |
309 Handle<JSObject> holder_obj, IC::UtilityId id) { | 303 Handle<JSObject> holder_obj, IC::UtilityId id) { |
310 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); | 304 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
311 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), | 305 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 // Return the generated code. | 764 // Return the generated code. |
771 return GetCode(kind(), Code::NORMAL, name); | 765 return GetCode(kind(), Code::NORMAL, name); |
772 } | 766 } |
773 | 767 |
774 | 768 |
775 #undef __ | 769 #undef __ |
776 } | 770 } |
777 } // namespace v8::internal | 771 } // namespace v8::internal |
778 | 772 |
779 #endif // V8_TARGET_ARCH_IA32 | 773 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |