OLD | NEW |
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 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 } | 3039 } |
3040 | 3040 |
3041 | 3041 |
3042 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3042 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3043 DCHECK(ToRegister(instr->context()).is(cp)); | 3043 DCHECK(ToRegister(instr->context()).is(cp)); |
3044 DCHECK(ToRegister(instr->global_object()) | 3044 DCHECK(ToRegister(instr->global_object()) |
3045 .is(LoadDescriptor::ReceiverRegister())); | 3045 .is(LoadDescriptor::ReceiverRegister())); |
3046 DCHECK(ToRegister(instr->result()).Is(x0)); | 3046 DCHECK(ToRegister(instr->result()).Is(x0)); |
3047 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3047 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3048 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3048 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3049 Handle<Code> ic = | 3049 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
3050 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), | 3050 isolate(), instr->typeof_mode(), PREMONOMORPHIC) |
3051 SLOPPY, PREMONOMORPHIC).code(); | 3051 .code(); |
3052 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3052 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3053 } | 3053 } |
3054 | 3054 |
3055 | 3055 |
3056 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3056 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3057 Register key, | 3057 Register key, |
3058 Register base, | 3058 Register base, |
3059 Register scratch, | 3059 Register scratch, |
3060 bool key_is_smi, | 3060 bool key_is_smi, |
3061 bool key_is_constant, | 3061 bool key_is_constant, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3304 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3304 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3305 DCHECK(ToRegister(instr->context()).is(cp)); | 3305 DCHECK(ToRegister(instr->context()).is(cp)); |
3306 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3306 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3307 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3307 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3308 | 3308 |
3309 if (instr->hydrogen()->HasVectorAndSlot()) { | 3309 if (instr->hydrogen()->HasVectorAndSlot()) { |
3310 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3310 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3311 } | 3311 } |
3312 | 3312 |
3313 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( | 3313 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3314 isolate(), instr->hydrogen()->language_mode(), | 3314 isolate(), instr->hydrogen()->initialization_state()) |
3315 instr->hydrogen()->initialization_state()).code(); | 3315 .code(); |
3316 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3316 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3317 | 3317 |
3318 DCHECK(ToRegister(instr->result()).Is(x0)); | 3318 DCHECK(ToRegister(instr->result()).Is(x0)); |
3319 } | 3319 } |
3320 | 3320 |
3321 | 3321 |
3322 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3322 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
3323 HObjectAccess access = instr->hydrogen()->access(); | 3323 HObjectAccess access = instr->hydrogen()->access(); |
3324 int offset = access.offset(); | 3324 int offset = access.offset(); |
3325 Register object = ToRegister(instr->object()); | 3325 Register object = ToRegister(instr->object()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3359 } | 3359 } |
3360 } | 3360 } |
3361 | 3361 |
3362 | 3362 |
3363 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3363 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3364 DCHECK(ToRegister(instr->context()).is(cp)); | 3364 DCHECK(ToRegister(instr->context()).is(cp)); |
3365 // LoadIC expects name and receiver in registers. | 3365 // LoadIC expects name and receiver in registers. |
3366 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3366 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3367 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3367 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3368 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3368 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3369 Handle<Code> ic = | 3369 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( |
3370 CodeFactory::LoadICInOptimizedCode( | 3370 isolate(), NOT_INSIDE_TYPEOF, |
3371 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), | 3371 instr->hydrogen()->initialization_state()) |
3372 instr->hydrogen()->initialization_state()).code(); | 3372 .code(); |
3373 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3373 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3374 | 3374 |
3375 DCHECK(ToRegister(instr->result()).is(x0)); | 3375 DCHECK(ToRegister(instr->result()).is(x0)); |
3376 } | 3376 } |
3377 | 3377 |
3378 | 3378 |
3379 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3379 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
3380 Register result = ToRegister(instr->result()); | 3380 Register result = ToRegister(instr->result()); |
3381 __ LoadRoot(result, instr->index()); | 3381 __ LoadRoot(result, instr->index()); |
3382 } | 3382 } |
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5740 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5740 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5741 __ Push(scope_info); | 5741 __ Push(scope_info); |
5742 __ Push(ToRegister(instr->function())); | 5742 __ Push(ToRegister(instr->function())); |
5743 CallRuntime(Runtime::kPushBlockContext, instr); | 5743 CallRuntime(Runtime::kPushBlockContext, instr); |
5744 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5744 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5745 } | 5745 } |
5746 | 5746 |
5747 | 5747 |
5748 } // namespace internal | 5748 } // namespace internal |
5749 } // namespace v8 | 5749 } // namespace v8 |
OLD | NEW |