| 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/v8.h" | 5 #include "src/v8.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/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2850 if (instr->hydrogen()->RequiresHoleCheck()) { | 2850 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2851 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2851 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 2852 DeoptimizeIf(eq, instr, "hole", result, Operand(at)); | 2852 DeoptimizeIf(eq, instr, "hole", result, Operand(at)); |
| 2853 } | 2853 } |
| 2854 } | 2854 } |
| 2855 | 2855 |
| 2856 | 2856 |
| 2857 template <class T> | 2857 template <class T> |
| 2858 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 2858 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
| 2859 DCHECK(FLAG_vector_ics); | 2859 DCHECK(FLAG_vector_ics); |
| 2860 Register vector = ToRegister(instr->temp_vector()); | 2860 Register vector_register = ToRegister(instr->temp_vector()); |
| 2861 DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister())); | 2861 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); |
| 2862 __ li(vector, instr->hydrogen()->feedback_vector()); | 2862 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 2863 __ li(vector_register, vector); |
| 2863 // No need to allocate this register. | 2864 // No need to allocate this register. |
| 2864 DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0)); | 2865 DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0)); |
| 2865 __ li(VectorLoadICDescriptor::SlotRegister(), | 2866 int index = vector->GetIndex(instr->hydrogen()->slot()); |
| 2866 Operand(Smi::FromInt(instr->hydrogen()->slot().ToInt()))); | 2867 __ li(VectorLoadICDescriptor::SlotRegister(), Operand(Smi::FromInt(index))); |
| 2867 } | 2868 } |
| 2868 | 2869 |
| 2869 | 2870 |
| 2870 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2871 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2871 DCHECK(ToRegister(instr->context()).is(cp)); | 2872 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2872 DCHECK(ToRegister(instr->global_object()) | 2873 DCHECK(ToRegister(instr->global_object()) |
| 2873 .is(LoadDescriptor::ReceiverRegister())); | 2874 .is(LoadDescriptor::ReceiverRegister())); |
| 2874 DCHECK(ToRegister(instr->result()).is(v0)); | 2875 DCHECK(ToRegister(instr->result()).is(v0)); |
| 2875 | 2876 |
| 2876 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2877 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| (...skipping 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5956 __ li(at, scope_info); | 5957 __ li(at, scope_info); |
| 5957 __ Push(at, ToRegister(instr->function())); | 5958 __ Push(at, ToRegister(instr->function())); |
| 5958 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5959 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5959 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5960 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5960 } | 5961 } |
| 5961 | 5962 |
| 5962 | 5963 |
| 5963 #undef __ | 5964 #undef __ |
| 5964 | 5965 |
| 5965 } } // namespace v8::internal | 5966 } } // namespace v8::internal |
| OLD | NEW |