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

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

Issue 2343813002: [ic] Move KeyedStoreIC::GenerateSlow() to ic-XXX.cc to avoid code duplication. (Closed)
Patch Set: Created 4 years, 3 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/s390/ic-s390.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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // the place to continue after deoptimization. 314 // the place to continue after deoptimization.
315 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 315 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
316 } 316 }
317 317
318 // Restore context register. 318 // Restore context register.
319 __ popq(rsi); 319 __ popq(rsi);
320 } 320 }
321 __ ret(0); 321 __ ret(0);
322 } 322 }
323 323
324
325 static void StoreIC_PushArgs(MacroAssembler* masm) {
326 Register receiver = StoreDescriptor::ReceiverRegister();
327 Register name = StoreDescriptor::NameRegister();
328 Register value = StoreDescriptor::ValueRegister();
329
330 Register slot = StoreWithVectorDescriptor::SlotRegister();
331 Register vector = StoreWithVectorDescriptor::VectorRegister();
332
333 __ PopReturnAddressTo(r11);
334 __ Push(receiver);
335 __ Push(name);
336 __ Push(value);
337 __ Push(slot);
338 __ Push(vector);
339 __ PushReturnAddressFrom(r11);
340 }
341
342
343 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
344 // Return address is on the stack.
345 StoreIC_PushArgs(masm);
346
347 // Do tail-call to runtime routine.
348 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
349 }
350
351
352 #undef __ 324 #undef __
353 #define __ ACCESS_MASM((masm())) 325 #define __ ACCESS_MASM((masm()))
354 326
355 327
356 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 328 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
357 Handle<Name> name) { 329 Handle<Name> name) {
358 if (!label->is_unused()) { 330 if (!label->is_unused()) {
359 __ bind(label); 331 __ bind(label);
360 __ Move(this->name(), name); 332 __ Move(this->name(), name);
361 } 333 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // Return the generated code. 680 // Return the generated code.
709 return GetCode(kind(), name); 681 return GetCode(kind(), name);
710 } 682 }
711 683
712 684
713 #undef __ 685 #undef __
714 } // namespace internal 686 } // namespace internal
715 } // namespace v8 687 } // namespace v8
716 688
717 #endif // V8_TARGET_ARCH_X64 689 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/s390/ic-s390.cc ('k') | src/ic/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698