| 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/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3385 result, Heap::kTheHoleValueRootIndex, instr->environment()); | 3385 result, Heap::kTheHoleValueRootIndex, instr->environment()); |
| 3386 } | 3386 } |
| 3387 } | 3387 } |
| 3388 | 3388 |
| 3389 | 3389 |
| 3390 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3390 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 3391 ASSERT(ToRegister(instr->context()).is(cp)); | 3391 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3392 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 3392 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); |
| 3393 ASSERT(ToRegister(instr->result()).Is(x0)); | 3393 ASSERT(ToRegister(instr->result()).Is(x0)); |
| 3394 __ Mov(LoadIC::NameRegister(), Operand(instr->name())); | 3394 __ Mov(LoadIC::NameRegister(), Operand(instr->name())); |
| 3395 if (FLAG_vector_ics) { |
| 3396 Register vector = ToRegister(instr->temp_vector()); |
| 3397 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3398 __ Mov(vector, instr->hydrogen()->feedback_vector()); |
| 3399 // No need to allocate this register. |
| 3400 ASSERT(LoadIC::SlotRegister().is(x0)); |
| 3401 __ Mov(LoadIC::SlotRegister(), |
| 3402 Smi::FromInt(instr->hydrogen()->slot())); |
| 3403 } |
| 3395 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3404 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 3396 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 3405 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
| 3397 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3406 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3398 } | 3407 } |
| 3399 | 3408 |
| 3400 | 3409 |
| 3401 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3410 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
| 3402 Register key, | 3411 Register key, |
| 3403 Register base, | 3412 Register base, |
| 3404 Register scratch, | 3413 Register scratch, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3637 instr->environment()); | 3646 instr->environment()); |
| 3638 } | 3647 } |
| 3639 } | 3648 } |
| 3640 } | 3649 } |
| 3641 | 3650 |
| 3642 | 3651 |
| 3643 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3652 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 3644 ASSERT(ToRegister(instr->context()).is(cp)); | 3653 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3645 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3654 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
| 3646 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 3655 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); |
| 3656 if (FLAG_vector_ics) { |
| 3657 Register vector = ToRegister(instr->temp_vector()); |
| 3658 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3659 __ Mov(vector, instr->hydrogen()->feedback_vector()); |
| 3660 // No need to allocate this register. |
| 3661 ASSERT(LoadIC::SlotRegister().is(x0)); |
| 3662 __ Mov(LoadIC::SlotRegister(), |
| 3663 Smi::FromInt(instr->hydrogen()->slot())); |
| 3664 } |
| 3647 | 3665 |
| 3648 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3666 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
| 3649 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3667 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3650 | 3668 |
| 3651 ASSERT(ToRegister(instr->result()).Is(x0)); | 3669 ASSERT(ToRegister(instr->result()).Is(x0)); |
| 3652 } | 3670 } |
| 3653 | 3671 |
| 3654 | 3672 |
| 3655 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 3673 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
| 3656 HObjectAccess access = instr->hydrogen()->access(); | 3674 HObjectAccess access = instr->hydrogen()->access(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3690 __ Load(result, FieldMemOperand(source, offset), access.representation()); | 3708 __ Load(result, FieldMemOperand(source, offset), access.representation()); |
| 3691 } | 3709 } |
| 3692 } | 3710 } |
| 3693 | 3711 |
| 3694 | 3712 |
| 3695 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3713 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3696 ASSERT(ToRegister(instr->context()).is(cp)); | 3714 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3697 // LoadIC expects name and receiver in registers. | 3715 // LoadIC expects name and receiver in registers. |
| 3698 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3716 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
| 3699 __ Mov(LoadIC::NameRegister(), Operand(instr->name())); | 3717 __ Mov(LoadIC::NameRegister(), Operand(instr->name())); |
| 3718 if (FLAG_vector_ics) { |
| 3719 Register vector = ToRegister(instr->temp_vector()); |
| 3720 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3721 __ Mov(vector, instr->hydrogen()->feedback_vector()); |
| 3722 // No need to allocate this register. |
| 3723 ASSERT(LoadIC::SlotRegister().is(x0)); |
| 3724 __ Mov(LoadIC::SlotRegister(), |
| 3725 Smi::FromInt(instr->hydrogen()->slot())); |
| 3726 } |
| 3700 | 3727 |
| 3701 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3728 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
| 3702 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3729 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3703 | 3730 |
| 3704 ASSERT(ToRegister(instr->result()).is(x0)); | 3731 ASSERT(ToRegister(instr->result()).is(x0)); |
| 3705 } | 3732 } |
| 3706 | 3733 |
| 3707 | 3734 |
| 3708 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { | 3735 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { |
| 3709 Register result = ToRegister(instr->result()); | 3736 Register result = ToRegister(instr->result()); |
| (...skipping 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6035 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6062 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6036 __ Push(scope_info); | 6063 __ Push(scope_info); |
| 6037 __ Push(ToRegister(instr->function())); | 6064 __ Push(ToRegister(instr->function())); |
| 6038 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6065 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6039 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6066 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6040 } | 6067 } |
| 6041 | 6068 |
| 6042 | 6069 |
| 6043 | 6070 |
| 6044 } } // namespace v8::internal | 6071 } } // namespace v8::internal |
| OLD | NEW |