OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2880 if (instr->hydrogen()->RequiresHoleCheck()) { | 2880 if (instr->hydrogen()->RequiresHoleCheck()) { |
2881 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2881 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
2882 DeoptimizeIf(eq, instr, "hole", result, Operand(at)); | 2882 DeoptimizeIf(eq, instr, "hole", result, Operand(at)); |
2883 } | 2883 } |
2884 } | 2884 } |
2885 | 2885 |
2886 | 2886 |
2887 template <class T> | 2887 template <class T> |
2888 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 2888 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
2889 DCHECK(FLAG_vector_ics); | 2889 DCHECK(FLAG_vector_ics); |
2890 Register vector = ToRegister(instr->temp_vector()); | 2890 Register vector_register = ToRegister(instr->temp_vector()); |
2891 DCHECK(vector.is(VectorLoadICDescriptor::VectorRegister())); | 2891 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); |
2892 __ li(vector, instr->hydrogen()->feedback_vector()); | 2892 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
| 2893 __ li(vector_register, vector); |
2893 // No need to allocate this register. | 2894 // No need to allocate this register. |
2894 DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0)); | 2895 DCHECK(VectorLoadICDescriptor::SlotRegister().is(a0)); |
2895 __ li(VectorLoadICDescriptor::SlotRegister(), | 2896 int index = vector->GetIndex(instr->hydrogen()->slot()); |
2896 Operand(Smi::FromInt(instr->hydrogen()->slot().ToInt()))); | 2897 __ li(VectorLoadICDescriptor::SlotRegister(), Operand(Smi::FromInt(index))); |
2897 } | 2898 } |
2898 | 2899 |
2899 | 2900 |
2900 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2901 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2901 DCHECK(ToRegister(instr->context()).is(cp)); | 2902 DCHECK(ToRegister(instr->context()).is(cp)); |
2902 DCHECK(ToRegister(instr->global_object()) | 2903 DCHECK(ToRegister(instr->global_object()) |
2903 .is(LoadDescriptor::ReceiverRegister())); | 2904 .is(LoadDescriptor::ReceiverRegister())); |
2904 DCHECK(ToRegister(instr->result()).is(v0)); | 2905 DCHECK(ToRegister(instr->result()).is(v0)); |
2905 | 2906 |
2906 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2907 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); |
(...skipping 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5925 __ li(at, scope_info); | 5926 __ li(at, scope_info); |
5926 __ Push(at, ToRegister(instr->function())); | 5927 __ Push(at, ToRegister(instr->function())); |
5927 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5928 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5928 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5929 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5929 } | 5930 } |
5930 | 5931 |
5931 | 5932 |
5932 #undef __ | 5933 #undef __ |
5933 | 5934 |
5934 } } // namespace v8::internal | 5935 } } // namespace v8::internal |
OLD | NEW |