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 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3347 | 3347 |
3348 | 3348 |
3349 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3349 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3350 DCHECK(ToRegister(instr->context()).is(cp)); | 3350 DCHECK(ToRegister(instr->context()).is(cp)); |
3351 DCHECK(ToRegister(instr->global_object()) | 3351 DCHECK(ToRegister(instr->global_object()) |
3352 .is(LoadDescriptor::ReceiverRegister())); | 3352 .is(LoadDescriptor::ReceiverRegister())); |
3353 DCHECK(ToRegister(instr->result()).Is(x0)); | 3353 DCHECK(ToRegister(instr->result()).Is(x0)); |
3354 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3354 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3355 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3355 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3356 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3356 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
3357 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, | 3357 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, |
3358 PREMONOMORPHIC).code(); | 3358 PREMONOMORPHIC).code(); |
3359 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3359 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3360 } | 3360 } |
3361 | 3361 |
3362 | 3362 |
3363 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3363 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3364 Register key, | 3364 Register key, |
3365 Register base, | 3365 Register base, |
3366 Register scratch, | 3366 Register scratch, |
3367 bool key_is_smi, | 3367 bool key_is_smi, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3617 | 3617 |
3618 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3618 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3619 DCHECK(ToRegister(instr->context()).is(cp)); | 3619 DCHECK(ToRegister(instr->context()).is(cp)); |
3620 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3620 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3621 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3621 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3622 | 3622 |
3623 if (instr->hydrogen()->HasVectorAndSlot()) { | 3623 if (instr->hydrogen()->HasVectorAndSlot()) { |
3624 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3624 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3625 } | 3625 } |
3626 | 3626 |
3627 Handle<Code> ic = | 3627 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3628 CodeFactory::KeyedLoadICInOptimizedCode( | 3628 isolate(), instr->hydrogen()->language_mode(), |
3629 isolate(), instr->hydrogen()->initialization_state()).code(); | 3629 instr->hydrogen()->initialization_state()).code(); |
3630 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3630 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3631 | 3631 |
3632 DCHECK(ToRegister(instr->result()).Is(x0)); | 3632 DCHECK(ToRegister(instr->result()).Is(x0)); |
3633 } | 3633 } |
3634 | 3634 |
3635 | 3635 |
3636 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3636 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
3637 HObjectAccess access = instr->hydrogen()->access(); | 3637 HObjectAccess access = instr->hydrogen()->access(); |
3638 int offset = access.offset(); | 3638 int offset = access.offset(); |
3639 Register object = ToRegister(instr->object()); | 3639 Register object = ToRegister(instr->object()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3673 } | 3673 } |
3674 } | 3674 } |
3675 | 3675 |
3676 | 3676 |
3677 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3677 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3678 DCHECK(ToRegister(instr->context()).is(cp)); | 3678 DCHECK(ToRegister(instr->context()).is(cp)); |
3679 // LoadIC expects name and receiver in registers. | 3679 // LoadIC expects name and receiver in registers. |
3680 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3680 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3681 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3681 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3682 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3682 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3683 | 3683 Handle<Code> ic = |
3684 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( | 3684 CodeFactory::LoadICInOptimizedCode( |
3685 isolate(), NOT_CONTEXTUAL, | 3685 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), |
3686 instr->hydrogen()->initialization_state()).code(); | 3686 instr->hydrogen()->initialization_state()).code(); |
3687 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3687 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3688 | 3688 |
3689 DCHECK(ToRegister(instr->result()).is(x0)); | 3689 DCHECK(ToRegister(instr->result()).is(x0)); |
3690 } | 3690 } |
3691 | 3691 |
3692 | 3692 |
3693 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3693 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
3694 Register result = ToRegister(instr->result()); | 3694 Register result = ToRegister(instr->result()); |
3695 __ LoadRoot(result, instr->index()); | 3695 __ LoadRoot(result, instr->index()); |
3696 } | 3696 } |
(...skipping 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6095 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6095 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6096 __ Push(scope_info); | 6096 __ Push(scope_info); |
6097 __ Push(ToRegister(instr->function())); | 6097 __ Push(ToRegister(instr->function())); |
6098 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6098 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6099 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6099 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6100 } | 6100 } |
6101 | 6101 |
6102 | 6102 |
6103 } // namespace internal | 6103 } // namespace internal |
6104 } // namespace v8 | 6104 } // namespace v8 |
OLD | NEW |