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/ppc/handler-compiler-ppc.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/mips64/ic-mips64.cc ('k') | src/ic/ppc/ic-ppc.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_PPC 5 #if V8_TARGET_ARCH_PPC
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 318 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
319 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 319 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
320 __ mov(api_function_address, Operand(ref)); 320 __ mov(api_function_address, Operand(ref));
321 321
322 // Jump to stub. 322 // Jump to stub.
323 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, 323 CallApiCallbackStub stub(isolate, is_store, call_data_undefined,
324 !optimization.is_constant_call()); 324 !optimization.is_constant_call());
325 __ TailCallStub(&stub); 325 __ TailCallStub(&stub);
326 } 326 }
327 327
328
329 static void StoreIC_PushArgs(MacroAssembler* masm) {
330 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
331 StoreDescriptor::ValueRegister(),
332 StoreWithVectorDescriptor::SlotRegister(),
333 StoreWithVectorDescriptor::VectorRegister());
334 }
335
336
337 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
338 StoreIC_PushArgs(masm);
339
340 // The slow case calls into the runtime to complete the store without causing
341 // an IC miss that would otherwise cause a transition to the generic stub.
342 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
343 }
344
345
346 #undef __ 328 #undef __
347 #define __ ACCESS_MASM(masm()) 329 #define __ ACCESS_MASM(masm())
348 330
349 331
350 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 332 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
351 Handle<Name> name) { 333 Handle<Name> name) {
352 if (!label->is_unused()) { 334 if (!label->is_unused()) {
353 __ bind(label); 335 __ bind(label);
354 __ mov(this->name(), Operand(name)); 336 __ mov(this->name(), Operand(name));
355 } 337 }
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 // Return the generated code. 673 // Return the generated code.
692 return GetCode(kind(), name); 674 return GetCode(kind(), name);
693 } 675 }
694 676
695 677
696 #undef __ 678 #undef __
697 } // namespace internal 679 } // namespace internal
698 } // namespace v8 680 } // namespace v8
699 681
700 #endif // V8_TARGET_ARCH_ARM 682 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/ic/ppc/ic-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698