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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3356 | 3356 |
3357 | 3357 |
3358 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3358 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3359 DCHECK(ToRegister(instr->context()).is(cp)); | 3359 DCHECK(ToRegister(instr->context()).is(cp)); |
3360 DCHECK(ToRegister(instr->global_object()) | 3360 DCHECK(ToRegister(instr->global_object()) |
3361 .is(LoadDescriptor::ReceiverRegister())); | 3361 .is(LoadDescriptor::ReceiverRegister())); |
3362 DCHECK(ToRegister(instr->result()).Is(x0)); | 3362 DCHECK(ToRegister(instr->result()).Is(x0)); |
3363 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3363 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3364 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3364 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3365 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3365 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
3366 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, | 3366 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, |
3367 PREMONOMORPHIC).code(); | 3367 PREMONOMORPHIC).code(); |
3368 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3368 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3369 } | 3369 } |
3370 | 3370 |
3371 | 3371 |
3372 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3372 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3373 Register key, | 3373 Register key, |
3374 Register base, | 3374 Register base, |
3375 Register scratch, | 3375 Register scratch, |
3376 bool key_is_smi, | 3376 bool key_is_smi, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3626 | 3626 |
3627 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3627 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3628 DCHECK(ToRegister(instr->context()).is(cp)); | 3628 DCHECK(ToRegister(instr->context()).is(cp)); |
3629 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3629 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3630 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3630 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3631 | 3631 |
3632 if (instr->hydrogen()->HasVectorAndSlot()) { | 3632 if (instr->hydrogen()->HasVectorAndSlot()) { |
3633 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3633 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3634 } | 3634 } |
3635 | 3635 |
3636 Handle<Code> ic = | 3636 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3637 CodeFactory::KeyedLoadICInOptimizedCode( | 3637 isolate(), instr->hydrogen()->language_mode(), |
3638 isolate(), instr->hydrogen()->initialization_state()).code(); | 3638 instr->hydrogen()->initialization_state()).code(); |
3639 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3639 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3640 | 3640 |
3641 DCHECK(ToRegister(instr->result()).Is(x0)); | 3641 DCHECK(ToRegister(instr->result()).Is(x0)); |
3642 } | 3642 } |
3643 | 3643 |
3644 | 3644 |
3645 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3645 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
3646 HObjectAccess access = instr->hydrogen()->access(); | 3646 HObjectAccess access = instr->hydrogen()->access(); |
3647 int offset = access.offset(); | 3647 int offset = access.offset(); |
3648 Register object = ToRegister(instr->object()); | 3648 Register object = ToRegister(instr->object()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3682 } | 3682 } |
3683 } | 3683 } |
3684 | 3684 |
3685 | 3685 |
3686 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3686 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3687 DCHECK(ToRegister(instr->context()).is(cp)); | 3687 DCHECK(ToRegister(instr->context()).is(cp)); |
3688 // LoadIC expects name and receiver in registers. | 3688 // LoadIC expects name and receiver in registers. |
3689 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3689 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3690 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3690 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3691 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3691 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3692 | 3692 Handle<Code> ic = |
3693 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( | 3693 CodeFactory::LoadICInOptimizedCode( |
3694 isolate(), NOT_CONTEXTUAL, | 3694 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), |
3695 instr->hydrogen()->initialization_state()).code(); | 3695 instr->hydrogen()->initialization_state()).code(); |
3696 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3696 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3697 | 3697 |
3698 DCHECK(ToRegister(instr->result()).is(x0)); | 3698 DCHECK(ToRegister(instr->result()).is(x0)); |
3699 } | 3699 } |
3700 | 3700 |
3701 | 3701 |
3702 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3702 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
3703 Register result = ToRegister(instr->result()); | 3703 Register result = ToRegister(instr->result()); |
3704 __ LoadRoot(result, instr->index()); | 3704 __ LoadRoot(result, instr->index()); |
3705 } | 3705 } |
(...skipping 2408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6114 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6114 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6115 __ Push(scope_info); | 6115 __ Push(scope_info); |
6116 __ Push(ToRegister(instr->function())); | 6116 __ Push(ToRegister(instr->function())); |
6117 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6117 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6118 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6118 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6119 } | 6119 } |
6120 | 6120 |
6121 | 6121 |
6122 } // namespace internal | 6122 } // namespace internal |
6123 } // namespace v8 | 6123 } // namespace v8 |
OLD | NEW |