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

Side by Side Diff: src/s390/code-stubs-s390.cc

Issue 2413653003: [stubs] Drop StoreICStub and StoreICTrampolineStub (the non-TurboFan implementations of StoreIC dis… (Closed)
Patch Set: Created 4 years, 2 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/ppc/code-stubs-ppc.cc ('k') | src/x64/code-stubs-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_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3299 HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss); 3299 HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss);
3300 3300
3301 __ bind(&miss); 3301 __ bind(&miss);
3302 KeyedLoadIC::GenerateMiss(masm); 3302 KeyedLoadIC::GenerateMiss(masm);
3303 3303
3304 __ bind(&load_smi_map); 3304 __ bind(&load_smi_map);
3305 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); 3305 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
3306 __ b(&compare_map); 3306 __ b(&compare_map);
3307 } 3307 }
3308 3308
3309 void StoreICTrampolineStub::Generate(MacroAssembler* masm) {
3310 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister());
3311 StoreICStub stub(isolate(), state());
3312 stub.GenerateForTrampoline(masm);
3313 }
3314
3315 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { 3309 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) {
3316 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister()); 3310 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister());
3317 KeyedStoreICStub stub(isolate(), state()); 3311 KeyedStoreICStub stub(isolate(), state());
3318 stub.GenerateForTrampoline(masm); 3312 stub.GenerateForTrampoline(masm);
3319 } 3313 }
3320 3314
3321 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
3322
3323 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) {
3324 GenerateImpl(masm, true);
3325 }
3326
3327 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
3328 Register receiver = StoreWithVectorDescriptor::ReceiverRegister(); // r3
3329 Register key = StoreWithVectorDescriptor::NameRegister(); // r4
3330 Register vector = StoreWithVectorDescriptor::VectorRegister(); // r5
3331 Register slot = StoreWithVectorDescriptor::SlotRegister(); // r6
3332 DCHECK(StoreWithVectorDescriptor::ValueRegister().is(r2)); // r2
3333 Register feedback = r7;
3334 Register receiver_map = r8;
3335 Register scratch1 = r9;
3336
3337 __ SmiToPtrArrayOffset(r0, slot);
3338 __ AddP(feedback, vector, r0);
3339 __ LoadP(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize));
3340
3341 // Try to quickly handle the monomorphic case without knowing for sure
3342 // if we have a weak cell in feedback. We do know it's safe to look
3343 // at WeakCell::kValueOffset.
3344 Label try_array, load_smi_map, compare_map;
3345 Label not_array, miss;
3346 HandleMonomorphicCase(masm, receiver, receiver_map, feedback, vector, slot,
3347 scratch1, &compare_map, &load_smi_map, &try_array);
3348
3349 // Is it a fixed array?
3350 __ bind(&try_array);
3351 __ LoadP(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
3352 __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex);
3353 __ bne(&not_array);
3354
3355 Register scratch2 = ip;
3356 HandleArrayCases(masm, feedback, receiver_map, scratch1, scratch2, true,
3357 &miss);
3358
3359 __ bind(&not_array);
3360 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
3361 __ bne(&miss);
3362 masm->isolate()->store_stub_cache()->GenerateProbe(
3363 masm, receiver, key, feedback, receiver_map, scratch1, scratch2);
3364
3365 __ bind(&miss);
3366 StoreIC::GenerateMiss(masm);
3367
3368 __ bind(&load_smi_map);
3369 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
3370 __ b(&compare_map);
3371 }
3372
3373 void KeyedStoreICStub::Generate(MacroAssembler* masm) { 3315 void KeyedStoreICStub::Generate(MacroAssembler* masm) {
3374 GenerateImpl(masm, false); 3316 GenerateImpl(masm, false);
3375 } 3317 }
3376 3318
3377 void KeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { 3319 void KeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) {
3378 GenerateImpl(masm, true); 3320 GenerateImpl(masm, true);
3379 } 3321 }
3380 3322
3381 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, 3323 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback,
3382 Register receiver_map, Register scratch1, 3324 Register receiver_map, Register scratch1,
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
5029 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 4971 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5030 kStackUnwindSpace, NULL, return_value_operand, NULL); 4972 kStackUnwindSpace, NULL, return_value_operand, NULL);
5031 } 4973 }
5032 4974
5033 #undef __ 4975 #undef __
5034 4976
5035 } // namespace internal 4977 } // namespace internal
5036 } // namespace v8 4978 } // namespace v8
5037 4979
5038 #endif // V8_TARGET_ARCH_S390 4980 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698