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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 2019313003: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compile error. Created 4 years, 6 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/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 } 3084 }
3085 3085
3086 3086
3087 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 3087 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
3088 DCHECK(ToRegister(instr->context()).is(cp)); 3088 DCHECK(ToRegister(instr->context()).is(cp));
3089 DCHECK(ToRegister(instr->global_object()) 3089 DCHECK(ToRegister(instr->global_object())
3090 .is(LoadDescriptor::ReceiverRegister())); 3090 .is(LoadDescriptor::ReceiverRegister()));
3091 DCHECK(ToRegister(instr->result()).Is(x0)); 3091 DCHECK(ToRegister(instr->result()).Is(x0));
3092 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3092 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3093 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3093 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3094 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3094 Handle<Code> ic =
3095 isolate(), instr->typeof_mode(), PREMONOMORPHIC) 3095 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode())
3096 .code(); 3096 .code();
3097 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3097 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3098 } 3098 }
3099 3099
3100 3100
3101 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( 3101 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand(
3102 Register key, 3102 Register key,
3103 Register base, 3103 Register base,
3104 Register scratch, 3104 Register scratch,
3105 bool key_is_smi, 3105 bool key_is_smi,
3106 bool key_is_constant, 3106 bool key_is_constant,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3344 __ Bind(&done); 3344 __ Bind(&done);
3345 } 3345 }
3346 } 3346 }
3347 3347
3348 3348
3349 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3349 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3350 DCHECK(ToRegister(instr->context()).is(cp)); 3350 DCHECK(ToRegister(instr->context()).is(cp));
3351 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3351 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3352 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3352 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3353 3353
3354 if (instr->hydrogen()->HasVectorAndSlot()) { 3354 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3355 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3356 }
3357 3355
3358 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( 3356 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3359 isolate(), instr->hydrogen()->initialization_state())
3360 .code();
3361 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3357 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3362 3358
3363 DCHECK(ToRegister(instr->result()).Is(x0)); 3359 DCHECK(ToRegister(instr->result()).Is(x0));
3364 } 3360 }
3365 3361
3366 3362
3367 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 3363 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
3368 HObjectAccess access = instr->hydrogen()->access(); 3364 HObjectAccess access = instr->hydrogen()->access();
3369 int offset = access.offset(); 3365 int offset = access.offset();
3370 Register object = ToRegister(instr->object()); 3366 Register object = ToRegister(instr->object());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 } 3400 }
3405 } 3401 }
3406 3402
3407 3403
3408 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3404 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3409 DCHECK(ToRegister(instr->context()).is(cp)); 3405 DCHECK(ToRegister(instr->context()).is(cp));
3410 // LoadIC expects name and receiver in registers. 3406 // LoadIC expects name and receiver in registers.
3411 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3407 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3412 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 3408 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
3413 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3409 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3414 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 3410 Handle<Code> ic =
3415 isolate(), NOT_INSIDE_TYPEOF, 3411 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
3416 instr->hydrogen()->initialization_state())
3417 .code();
3418 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3412 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3419 3413
3420 DCHECK(ToRegister(instr->result()).is(x0)); 3414 DCHECK(ToRegister(instr->result()).is(x0));
3421 } 3415 }
3422 3416
3423 3417
3424 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { 3418 void LCodeGen::DoLoadRoot(LLoadRoot* instr) {
3425 Register result = ToRegister(instr->result()); 3419 Register result = ToRegister(instr->result());
3426 __ LoadRoot(result, instr->index()); 3420 __ LoadRoot(result, instr->index());
3427 } 3421 }
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
4988 } 4982 }
4989 } 4983 }
4990 4984
4991 4985
4992 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4986 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4993 DCHECK(ToRegister(instr->context()).is(cp)); 4987 DCHECK(ToRegister(instr->context()).is(cp));
4994 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4988 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4995 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4989 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4996 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4990 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4997 4991
4998 if (instr->hydrogen()->HasVectorAndSlot()) { 4992 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4999 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
5000 }
5001 4993
5002 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( 4994 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
5003 isolate(), instr->language_mode(), 4995 isolate(), instr->language_mode())
5004 instr->hydrogen()->initialization_state()).code(); 4996 .code();
5005 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4997 CallCode(ic, RelocInfo::CODE_TARGET, instr);
5006 } 4998 }
5007 4999
5008 5000
5009 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 5001 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
5010 class DeferredMaybeGrowElements final : public LDeferredCode { 5002 class DeferredMaybeGrowElements final : public LDeferredCode {
5011 public: 5003 public:
5012 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 5004 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
5013 : LDeferredCode(codegen), instr_(instr) {} 5005 : LDeferredCode(codegen), instr_(instr) {}
5014 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 5006 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 instr->hydrogen()->PointersToHereCheckForValue()); 5180 instr->hydrogen()->PointersToHereCheckForValue());
5189 } 5181 }
5190 } 5182 }
5191 5183
5192 5184
5193 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 5185 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
5194 DCHECK(ToRegister(instr->context()).is(cp)); 5186 DCHECK(ToRegister(instr->context()).is(cp));
5195 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 5187 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
5196 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 5188 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
5197 5189
5198 if (instr->hydrogen()->HasVectorAndSlot()) { 5190 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
5199 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
5200 }
5201 5191
5202 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name())); 5192 __ Mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
5203 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( 5193 Handle<Code> ic =
5204 isolate(), instr->language_mode(), 5194 CodeFactory::StoreICInOptimizedCode(isolate(), instr->language_mode())
5205 instr->hydrogen()->initialization_state()).code(); 5195 .code();
5206 CallCode(ic, RelocInfo::CODE_TARGET, instr); 5196 CallCode(ic, RelocInfo::CODE_TARGET, instr);
5207 } 5197 }
5208 5198
5209 5199
5210 void LCodeGen::DoStringAdd(LStringAdd* instr) { 5200 void LCodeGen::DoStringAdd(LStringAdd* instr) {
5211 DCHECK(ToRegister(instr->context()).is(cp)); 5201 DCHECK(ToRegister(instr->context()).is(cp));
5212 DCHECK(ToRegister(instr->left()).Is(x1)); 5202 DCHECK(ToRegister(instr->left()).Is(x1));
5213 DCHECK(ToRegister(instr->right()).Is(x0)); 5203 DCHECK(ToRegister(instr->right()).Is(x0));
5214 StringAddStub stub(isolate(), 5204 StringAddStub stub(isolate(),
5215 instr->hydrogen()->flags(), 5205 instr->hydrogen()->flags(),
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
5761 // Index is equal to negated out of object property index plus 1. 5751 // Index is equal to negated out of object property index plus 1.
5762 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5752 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5763 __ Ldr(result, FieldMemOperand(result, 5753 __ Ldr(result, FieldMemOperand(result,
5764 FixedArray::kHeaderSize - kPointerSize)); 5754 FixedArray::kHeaderSize - kPointerSize));
5765 __ Bind(deferred->exit()); 5755 __ Bind(deferred->exit());
5766 __ Bind(&done); 5756 __ Bind(&done);
5767 } 5757 }
5768 5758
5769 } // namespace internal 5759 } // namespace internal
5770 } // namespace v8 5760 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698