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

Side by Side Diff: src/ic/x64/handler-compiler-x64.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/ia32/ic-ia32.cc ('k') | src/ic/x64/ic-x64.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"
11 #include "src/ic/ic.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 #define __ ACCESS_MASM(masm) 16 #define __ ACCESS_MASM(masm)
16 17
17 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( 18 void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
18 MacroAssembler* masm, Label* miss_label, Register receiver, 19 MacroAssembler* masm, Label* miss_label, Register receiver,
19 Handle<Name> name, Register scratch0, Register scratch1) { 20 Handle<Name> name, Register scratch0, Register scratch1) {
20 DCHECK(name->IsUniqueName()); 21 DCHECK(name->IsUniqueName());
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 __ bind(&miss); 313 __ bind(&miss);
313 // ----------- S t a t e ------------- 314 // ----------- S t a t e -------------
314 // -- rcx : key 315 // -- rcx : key
315 // -- rdx : receiver 316 // -- rdx : receiver
316 // -- rsp[0] : return address 317 // -- rsp[0] : return address
317 // ----------------------------------- 318 // -----------------------------------
318 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 319 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
319 } 320 }
320 321
321 322
323 static void StoreIC_PushArgs(MacroAssembler* masm) {
324 Register receiver = StoreIC::ReceiverRegister();
325 Register name = StoreIC::NameRegister();
326 Register value = StoreIC::ValueRegister();
327
328 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
329
330 __ PopReturnAddressTo(rbx);
331 __ Push(receiver);
332 __ Push(name);
333 __ Push(value);
334 __ PushReturnAddressFrom(rbx);
335 }
336
337
338 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
339 // Return address is on the stack.
340 StoreIC_PushArgs(masm);
341
342 // Do tail-call to runtime routine.
343 ExternalReference ref(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
344 __ TailCallExternalReference(ref, 3, 1);
345 }
346
347
348 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
349 // Return address is on the stack.
350 StoreIC_PushArgs(masm);
351
352 // Do tail-call to runtime routine.
353 ExternalReference ref(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
354 __ TailCallExternalReference(ref, 3, 1);
355 }
356
357
322 #undef __ 358 #undef __
323 #define __ ACCESS_MASM((masm())) 359 #define __ ACCESS_MASM((masm()))
324 360
325 361
326 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 362 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
327 Handle<Name> name) { 363 Handle<Name> name) {
328 if (!label->is_unused()) { 364 if (!label->is_unused()) {
329 __ bind(label); 365 __ bind(label);
330 __ Move(this->name(), name); 366 __ Move(this->name(), name);
331 } 367 }
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // Return the generated code. 869 // Return the generated code.
834 return GetCode(kind(), Code::NORMAL, name); 870 return GetCode(kind(), Code::NORMAL, name);
835 } 871 }
836 872
837 873
838 #undef __ 874 #undef __
839 } 875 }
840 } // namespace v8::internal 876 } // namespace v8::internal
841 877
842 #endif // V8_TARGET_ARCH_X64 878 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698