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 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3018 AllowDeferredHandleDereference vector_structure_check; | 3018 AllowDeferredHandleDereference vector_structure_check; |
3019 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 3019 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
3020 __ Mov(vector_register, vector); | 3020 __ Mov(vector_register, vector); |
3021 // No need to allocate this register. | 3021 // No need to allocate this register. |
3022 FeedbackVectorSlot slot = instr->hydrogen()->slot(); | 3022 FeedbackVectorSlot slot = instr->hydrogen()->slot(); |
3023 int index = vector->GetIndex(slot); | 3023 int index = vector->GetIndex(slot); |
3024 __ Mov(slot_register, Smi::FromInt(index)); | 3024 __ Mov(slot_register, Smi::FromInt(index)); |
3025 } | 3025 } |
3026 | 3026 |
3027 | 3027 |
3028 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | |
3029 DCHECK(ToRegister(instr->context()).is(cp)); | |
3030 DCHECK(ToRegister(instr->result()).Is(x0)); | |
3031 | |
3032 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | |
3033 Handle<Code> ic = | |
3034 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) | |
3035 .code(); | |
3036 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
3037 } | |
3038 | |
3039 | |
3040 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( | 3028 MemOperand LCodeGen::PrepareKeyedExternalArrayOperand( |
3041 Register key, | 3029 Register key, |
3042 Register base, | 3030 Register base, |
3043 Register scratch, | 3031 Register scratch, |
3044 bool key_is_smi, | 3032 bool key_is_smi, |
3045 bool key_is_constant, | 3033 bool key_is_constant, |
3046 int constant_key, | 3034 int constant_key, |
3047 ElementsKind elements_kind, | 3035 ElementsKind elements_kind, |
3048 int base_offset) { | 3036 int base_offset) { |
3049 int element_size_shift = ElementsKindToShiftSize(elements_kind); | 3037 int element_size_shift = ElementsKindToShiftSize(elements_kind); |
(...skipping 2609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5659 // Index is equal to negated out of object property index plus 1. | 5647 // Index is equal to negated out of object property index plus 1. |
5660 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5648 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5661 __ Ldr(result, FieldMemOperand(result, | 5649 __ Ldr(result, FieldMemOperand(result, |
5662 FixedArray::kHeaderSize - kPointerSize)); | 5650 FixedArray::kHeaderSize - kPointerSize)); |
5663 __ Bind(deferred->exit()); | 5651 __ Bind(deferred->exit()); |
5664 __ Bind(&done); | 5652 __ Bind(&done); |
5665 } | 5653 } |
5666 | 5654 |
5667 } // namespace internal | 5655 } // namespace internal |
5668 } // namespace v8 | 5656 } // namespace v8 |
OLD | NEW |