Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Side by Side Diff: src/ic/ia32/handler-compiler-ia32.cc

Issue 893573003: Do not embed interceptor in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698