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 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 | 3385 |
3386 | 3386 |
3387 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3387 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3388 DCHECK(ToRegister(instr->context()).is(cp)); | 3388 DCHECK(ToRegister(instr->context()).is(cp)); |
3389 DCHECK(ToRegister(instr->global_object()) | 3389 DCHECK(ToRegister(instr->global_object()) |
3390 .is(LoadDescriptor::ReceiverRegister())); | 3390 .is(LoadDescriptor::ReceiverRegister())); |
3391 DCHECK(ToRegister(instr->result()).Is(x0)); | 3391 DCHECK(ToRegister(instr->result()).Is(x0)); |
3392 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3392 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3393 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3393 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
3394 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3394 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
3395 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, | 3395 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, |
3396 PREMONOMORPHIC).code(); | 3396 PREMONOMORPHIC).code(); |
3397 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3397 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3398 } | 3398 } |
3399 | 3399 |
3400 | 3400 |
3401 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3401 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3402 Register key, | 3402 Register key, |
3403 Register base, | 3403 Register base, |
3404 Register scratch, | 3404 Register scratch, |
3405 bool key_is_smi, | 3405 bool key_is_smi, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3655 | 3655 |
3656 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3656 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3657 DCHECK(ToRegister(instr->context()).is(cp)); | 3657 DCHECK(ToRegister(instr->context()).is(cp)); |
3658 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3658 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3659 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3659 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3660 | 3660 |
3661 if (instr->hydrogen()->HasVectorAndSlot()) { | 3661 if (instr->hydrogen()->HasVectorAndSlot()) { |
3662 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3662 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3663 } | 3663 } |
3664 | 3664 |
3665 Handle<Code> ic = | 3665 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode( |
3666 CodeFactory::KeyedLoadICInOptimizedCode( | 3666 isolate(), instr->hydrogen()->language_mode(), |
3667 isolate(), instr->hydrogen()->initialization_state()).code(); | 3667 instr->hydrogen()->initialization_state()).code(); |
3668 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3668 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3669 | 3669 |
3670 DCHECK(ToRegister(instr->result()).Is(x0)); | 3670 DCHECK(ToRegister(instr->result()).Is(x0)); |
3671 } | 3671 } |
3672 | 3672 |
3673 | 3673 |
3674 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3674 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
3675 HObjectAccess access = instr->hydrogen()->access(); | 3675 HObjectAccess access = instr->hydrogen()->access(); |
3676 int offset = access.offset(); | 3676 int offset = access.offset(); |
3677 Register object = ToRegister(instr->object()); | 3677 Register object = ToRegister(instr->object()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3711 } | 3711 } |
3712 } | 3712 } |
3713 | 3713 |
3714 | 3714 |
3715 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3715 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3716 DCHECK(ToRegister(instr->context()).is(cp)); | 3716 DCHECK(ToRegister(instr->context()).is(cp)); |
3717 // LoadIC expects name and receiver in registers. | 3717 // LoadIC expects name and receiver in registers. |
3718 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3718 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3719 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3719 __ Mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
3720 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3720 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3721 | 3721 Handle<Code> ic = |
3722 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( | 3722 CodeFactory::LoadICInOptimizedCode( |
3723 isolate(), NOT_CONTEXTUAL, | 3723 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), |
3724 instr->hydrogen()->initialization_state()).code(); | 3724 instr->hydrogen()->initialization_state()).code(); |
3725 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3725 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3726 | 3726 |
3727 DCHECK(ToRegister(instr->result()).is(x0)); | 3727 DCHECK(ToRegister(instr->result()).is(x0)); |
3728 } | 3728 } |
3729 | 3729 |
3730 | 3730 |
3731 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3731 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
3732 Register result = ToRegister(instr->result()); | 3732 Register result = ToRegister(instr->result()); |
3733 __ LoadRoot(result, instr->index()); | 3733 __ LoadRoot(result, instr->index()); |
3734 } | 3734 } |
(...skipping 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6133 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6133 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6134 __ Push(scope_info); | 6134 __ Push(scope_info); |
6135 __ Push(ToRegister(instr->function())); | 6135 __ Push(ToRegister(instr->function())); |
6136 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6136 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6137 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6137 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6138 } | 6138 } |
6139 | 6139 |
6140 | 6140 |
6141 } // namespace internal | 6141 } // namespace internal |
6142 } // namespace v8 | 6142 } // namespace v8 |
OLD | NEW |