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

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

Issue 496283004: Move "slow handler" compiler code to handler-compiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/ia32/ic-ia32.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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 static void CompileCallLoadPropertyWithInterceptor( 320 static void CompileCallLoadPropertyWithInterceptor(
321 MacroAssembler* masm, Register receiver, Register holder, Register name, 321 MacroAssembler* masm, Register receiver, Register holder, Register name,
322 Handle<JSObject> holder_obj, IC::UtilityId id) { 322 Handle<JSObject> holder_obj, IC::UtilityId id) {
323 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 323 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
324 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()), 324 __ CallExternalReference(ExternalReference(IC_Utility(id), masm->isolate()),
325 NamedLoadHandlerCompiler::kInterceptorArgsLength); 325 NamedLoadHandlerCompiler::kInterceptorArgsLength);
326 } 326 }
327 327
328 328
329 static void StoreIC_PushArgs(MacroAssembler* masm) {
330 Register receiver = StoreIC::ReceiverRegister();
331 Register name = StoreIC::NameRegister();
332 Register value = StoreIC::ValueRegister();
333
334 DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value));
335
336 __ pop(ebx);
337 __ push(receiver);
338 __ push(name);
339 __ push(value);
340 __ push(ebx);
341 }
342
343
344 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
345 // Return address is on the stack.
346 StoreIC_PushArgs(masm);
347
348 // Do tail-call to runtime routine.
349 ExternalReference ref(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
350 __ TailCallExternalReference(ref, 3, 1);
351 }
352
353
354 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
355 // Return address is on the stack.
356 StoreIC_PushArgs(masm);
357
358 // Do tail-call to runtime routine.
359 ExternalReference ref(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
360 __ TailCallExternalReference(ref, 3, 1);
361 }
362
363
329 #undef __ 364 #undef __
330 #define __ ACCESS_MASM(masm()) 365 #define __ ACCESS_MASM(masm())
331 366
332 367
333 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 368 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
334 Handle<Name> name) { 369 Handle<Name> name) {
335 if (!label->is_unused()) { 370 if (!label->is_unused()) {
336 __ bind(label); 371 __ bind(label);
337 __ mov(this->name(), Immediate(name)); 372 __ mov(this->name(), Immediate(name));
338 } 373 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 // Return the generated code. 888 // Return the generated code.
854 return GetCode(kind(), Code::NORMAL, name); 889 return GetCode(kind(), Code::NORMAL, name);
855 } 890 }
856 891
857 892
858 #undef __ 893 #undef __
859 } 894 }
860 } // namespace v8::internal 895 } // namespace v8::internal
861 896
862 #endif // V8_TARGET_ARCH_IA32 897 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698