OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 AllowDeferredHandleDereference vector_structure_check; | 2610 AllowDeferredHandleDereference vector_structure_check; |
2611 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 2611 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
2612 __ li(vector_register, vector); | 2612 __ li(vector_register, vector); |
2613 // No need to allocate this register. | 2613 // No need to allocate this register. |
2614 FeedbackVectorSlot slot = instr->hydrogen()->slot(); | 2614 FeedbackVectorSlot slot = instr->hydrogen()->slot(); |
2615 int index = vector->GetIndex(slot); | 2615 int index = vector->GetIndex(slot); |
2616 __ li(slot_register, Operand(Smi::FromInt(index))); | 2616 __ li(slot_register, Operand(Smi::FromInt(index))); |
2617 } | 2617 } |
2618 | 2618 |
2619 | 2619 |
2620 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | |
2621 DCHECK(ToRegister(instr->context()).is(cp)); | |
2622 DCHECK(ToRegister(instr->result()).is(v0)); | |
2623 | |
2624 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | |
2625 Handle<Code> ic = | |
2626 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) | |
2627 .code(); | |
2628 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
2629 } | |
2630 | |
2631 | |
2632 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2620 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
2633 Register context = ToRegister(instr->context()); | 2621 Register context = ToRegister(instr->context()); |
2634 Register result = ToRegister(instr->result()); | 2622 Register result = ToRegister(instr->result()); |
2635 | 2623 |
2636 __ ld(result, ContextMemOperand(context, instr->slot_index())); | 2624 __ ld(result, ContextMemOperand(context, instr->slot_index())); |
2637 if (instr->hydrogen()->RequiresHoleCheck()) { | 2625 if (instr->hydrogen()->RequiresHoleCheck()) { |
2638 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2626 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
2639 | 2627 |
2640 if (instr->hydrogen()->DeoptimizesOnHole()) { | 2628 if (instr->hydrogen()->DeoptimizesOnHole()) { |
2641 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, Operand(at)); | 2629 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, Operand(at)); |
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5699 __ ld(result, FieldMemOperand(scratch, | 5687 __ ld(result, FieldMemOperand(scratch, |
5700 FixedArray::kHeaderSize - kPointerSize)); | 5688 FixedArray::kHeaderSize - kPointerSize)); |
5701 __ bind(deferred->exit()); | 5689 __ bind(deferred->exit()); |
5702 __ bind(&done); | 5690 __ bind(&done); |
5703 } | 5691 } |
5704 | 5692 |
5705 #undef __ | 5693 #undef __ |
5706 | 5694 |
5707 } // namespace internal | 5695 } // namespace internal |
5708 } // namespace v8 | 5696 } // namespace v8 |
OLD | NEW |