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

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

Issue 504043003: X87: Move "slow handler" compiler code to handler-compiler (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@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
« no previous file with comments | « no previous file | src/ic/x87/ic-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 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 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 // Return the generated code. 890 // Return the generated code.
856 return GetCode(kind(), Code::NORMAL, name); 891 return GetCode(kind(), Code::NORMAL, name);
857 } 892 }
858 893
859 894
860 #undef __ 895 #undef __
861 } 896 }
862 } // namespace v8::internal 897 } // namespace v8::internal
863 898
864 #endif // V8_TARGET_ARCH_X87 899 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/ic/x87/ic-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698