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

Side by Side Diff: src/ic/mips/handler-compiler-mips.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/ic.cc ('k') | src/ic/mips64/handler-compiler-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); 201 __ lw(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
202 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 202 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
203 __ Branch(miss, ne, scratch, Operand(at)); 203 __ Branch(miss, ne, scratch, Operand(at));
204 } 204 }
205 205
206 206
207 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, 207 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
208 Register holder, Register name, 208 Register holder, Register name,
209 Handle<JSObject> holder_obj) { 209 Handle<JSObject> holder_obj) {
210 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); 210 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0);
211 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); 211 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1);
212 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 2); 212 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2);
213 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 3); 213 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3);
214 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 4); 214 __ Push(name, receiver, holder);
215 __ push(name);
216 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
217 DCHECK(!masm->isolate()->heap()->InNewSpace(*interceptor));
218 Register scratch = name;
219 __ li(scratch, Operand(interceptor));
220 __ Push(scratch, receiver, holder);
221 } 215 }
222 216
223 217
224 static void CompileCallLoadPropertyWithInterceptor( 218 static void CompileCallLoadPropertyWithInterceptor(
225 MacroAssembler* masm, Register receiver, Register holder, Register name, 219 MacroAssembler* masm, Register receiver, Register holder, Register name,
226 Handle<JSObject> holder_obj, IC::UtilityId id) { 220 Handle<JSObject> holder_obj, IC::UtilityId id) {
227 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 221 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
228 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), 222 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
229 NamedLoadHandlerCompiler::kInterceptorArgsLength); 223 NamedLoadHandlerCompiler::kInterceptorArgsLength);
230 } 224 }
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // Return the generated code. 733 // Return the generated code.
740 return GetCode(kind(), Code::NORMAL, name); 734 return GetCode(kind(), Code::NORMAL, name);
741 } 735 }
742 736
743 737
744 #undef __ 738 #undef __
745 } 739 }
746 } // namespace v8::internal 740 } // namespace v8::internal
747 741
748 #endif // V8_TARGET_ARCH_MIPS 742 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698