| 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 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2634 | 2634 |
| 2635 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2635 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2636 DCHECK(ToRegister(instr->context()).is(cp)); | 2636 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2637 DCHECK(ToRegister(instr->global_object()) | 2637 DCHECK(ToRegister(instr->global_object()) |
| 2638 .is(LoadDescriptor::ReceiverRegister())); | 2638 .is(LoadDescriptor::ReceiverRegister())); |
| 2639 DCHECK(ToRegister(instr->result()).is(v0)); | 2639 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2640 | 2640 |
| 2641 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2641 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2642 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2642 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2643 Handle<Code> ic = | 2643 Handle<Code> ic = |
| 2644 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 2644 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
| 2645 .code(); | 2645 .code(); |
| 2646 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2646 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 | 2649 |
| 2650 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2650 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2651 Register context = ToRegister(instr->context()); | 2651 Register context = ToRegister(instr->context()); |
| 2652 Register result = ToRegister(instr->result()); | 2652 Register result = ToRegister(instr->result()); |
| 2653 | 2653 |
| 2654 __ ld(result, ContextMemOperand(context, instr->slot_index())); | 2654 __ ld(result, ContextMemOperand(context, instr->slot_index())); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2749 | 2749 |
| 2750 | 2750 |
| 2751 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2751 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2752 DCHECK(ToRegister(instr->context()).is(cp)); | 2752 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2753 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2753 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2754 DCHECK(ToRegister(instr->result()).is(v0)); | 2754 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2755 | 2755 |
| 2756 // Name is always in a2. | 2756 // Name is always in a2. |
| 2757 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2757 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2758 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2758 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2759 Handle<Code> ic = | 2759 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
| 2760 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
| 2761 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2760 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2762 } | 2761 } |
| 2763 | 2762 |
| 2764 | 2763 |
| 2765 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2764 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2766 Register scratch = scratch0(); | 2765 Register scratch = scratch0(); |
| 2767 Register function = ToRegister(instr->function()); | 2766 Register function = ToRegister(instr->function()); |
| 2768 Register result = ToRegister(instr->result()); | 2767 Register result = ToRegister(instr->result()); |
| 2769 | 2768 |
| 2770 // Get the prototype or initial map from the function. | 2769 // Get the prototype or initial map from the function. |
| (...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5753 __ ld(result, FieldMemOperand(scratch, | 5752 __ ld(result, FieldMemOperand(scratch, |
| 5754 FixedArray::kHeaderSize - kPointerSize)); | 5753 FixedArray::kHeaderSize - kPointerSize)); |
| 5755 __ bind(deferred->exit()); | 5754 __ bind(deferred->exit()); |
| 5756 __ bind(&done); | 5755 __ bind(&done); |
| 5757 } | 5756 } |
| 5758 | 5757 |
| 5759 #undef __ | 5758 #undef __ |
| 5760 | 5759 |
| 5761 } // namespace internal | 5760 } // namespace internal |
| 5762 } // namespace v8 | 5761 } // namespace v8 |
| OLD | NEW |