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

Side by Side Diff: src/ic/x64/handler-compiler-x64.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/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.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_X64 7 #if V8_TARGET_ARCH_X64
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 __ TryGetFunctionPrototype(receiver, result, miss_label); 97 __ TryGetFunctionPrototype(receiver, result, miss_label);
98 if (!result.is(rax)) __ movp(rax, result); 98 if (!result.is(rax)) __ movp(rax, result);
99 __ ret(0); 99 __ ret(0);
100 } 100 }
101 101
102 102
103 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, 103 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
104 Register holder, Register name, 104 Register holder, Register name,
105 Handle<JSObject> holder_obj) { 105 Handle<JSObject> holder_obj) {
106 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); 106 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
107 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); 107 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1);
108 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); 108 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2);
109 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); 109 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3);
110 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4);
111 __ Push(name); 110 __ Push(name);
112 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
113 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor));
114 __ Move(kScratchRegister, interceptor);
115 __ Push(kScratchRegister);
116 __ Push(receiver); 111 __ Push(receiver);
117 __ Push(holder); 112 __ Push(holder);
118 } 113 }
119 114
120 115
121 static void CompileCallLoadPropertyWithInterceptor( 116 static void CompileCallLoadPropertyWithInterceptor(
122 MacroAssembler* masm, Register receiver, Register holder, Register name, 117 MacroAssembler* masm, Register receiver, Register holder, Register name,
123 Handle<JSObject> holder_obj, IC::UtilityId id) { 118 Handle<JSObject> holder_obj, IC::UtilityId id) {
124 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 119 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
125 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), 120 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // Return the generated code. 753 // Return the generated code.
759 return GetCode(kind(), Code::NORMAL, name); 754 return GetCode(kind(), Code::NORMAL, name);
760 } 755 }
761 756
762 757
763 #undef __ 758 #undef __
764 } 759 }
765 } // namespace v8::internal 760 } // namespace v8::internal
766 761
767 #endif // V8_TARGET_ARCH_X64 762 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698