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

Side by Side Diff: src/ic/x87/handler-compiler-x87.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/x64/handler-compiler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X87 7 #if V8_TARGET_ARCH_X87
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 283 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
284 } 284 }
285 __ ret(0); 285 __ ret(0);
286 } 286 }
287 287
288 288
289 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, 289 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
290 Register holder, Register name, 290 Register holder, Register name,
291 Handle<JSObject> holder_obj) { 291 Handle<JSObject> holder_obj) {
292 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); 292 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
293 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); 293 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1);
294 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); 294 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2);
295 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); 295 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3);
296 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4);
297 __ push(name); 296 __ push(name);
298 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
299 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor));
300 Register scratch = name;
301 __ mov(scratch, Immediate(interceptor));
302 __ push(scratch);
303 __ push(receiver); 297 __ push(receiver);
304 __ push(holder); 298 __ push(holder);
305 } 299 }
306 300
307 301
308 static void CompileCallLoadPropertyWithInterceptor( 302 static void CompileCallLoadPropertyWithInterceptor(
309 MacroAssembler* masm, Register receiver, Register holder, Register name, 303 MacroAssembler* masm, Register receiver, Register holder, Register name,
310 Handle<JSObject> holder_obj, IC::UtilityId id) { 304 Handle<JSObject> holder_obj, IC::UtilityId id) {
311 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 305 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
312 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), 306 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // Return the generated code. 765 // Return the generated code.
772 return GetCode(kind(), Code::NORMAL, name); 766 return GetCode(kind(), Code::NORMAL, name);
773 } 767 }
774 768
775 769
776 #undef __ 770 #undef __
777 } 771 }
778 } // namespace v8::internal 772 } // namespace v8::internal
779 773
780 #endif // V8_TARGET_ARCH_X87 774 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698