OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2877 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 2877 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
2878 Register vector_register = ToRegister(instr->temp_vector()); | 2878 Register vector_register = ToRegister(instr->temp_vector()); |
2879 Register slot_register = LoadDescriptor::SlotRegister(); | 2879 Register slot_register = LoadDescriptor::SlotRegister(); |
2880 DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister())); | 2880 DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister())); |
2881 DCHECK(slot_register.is(r3)); | 2881 DCHECK(slot_register.is(r3)); |
2882 | 2882 |
2883 AllowDeferredHandleDereference vector_structure_check; | 2883 AllowDeferredHandleDereference vector_structure_check; |
2884 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 2884 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
2885 __ Move(vector_register, vector); | 2885 __ Move(vector_register, vector); |
2886 // No need to allocate this register. | 2886 // No need to allocate this register. |
2887 FeedbackVectorICSlot slot = instr->hydrogen()->slot(); | 2887 FeedbackVectorSlot slot = instr->hydrogen()->slot(); |
2888 int index = vector->GetIndex(slot); | 2888 int index = vector->GetIndex(slot); |
2889 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); | 2889 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); |
2890 } | 2890 } |
2891 | 2891 |
2892 | 2892 |
2893 template <class T> | 2893 template <class T> |
2894 void LCodeGen::EmitVectorStoreICRegisters(T* instr) { | 2894 void LCodeGen::EmitVectorStoreICRegisters(T* instr) { |
2895 Register vector_register = ToRegister(instr->temp_vector()); | 2895 Register vector_register = ToRegister(instr->temp_vector()); |
2896 Register slot_register = ToRegister(instr->temp_slot()); | 2896 Register slot_register = ToRegister(instr->temp_slot()); |
2897 | 2897 |
2898 AllowDeferredHandleDereference vector_structure_check; | 2898 AllowDeferredHandleDereference vector_structure_check; |
2899 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 2899 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
2900 __ Move(vector_register, vector); | 2900 __ Move(vector_register, vector); |
2901 FeedbackVectorICSlot slot = instr->hydrogen()->slot(); | 2901 FeedbackVectorSlot slot = instr->hydrogen()->slot(); |
2902 int index = vector->GetIndex(slot); | 2902 int index = vector->GetIndex(slot); |
2903 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); | 2903 __ LoadSmiLiteral(slot_register, Smi::FromInt(index)); |
2904 } | 2904 } |
2905 | 2905 |
2906 | 2906 |
2907 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2907 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2908 DCHECK(ToRegister(instr->context()).is(cp)); | 2908 DCHECK(ToRegister(instr->context()).is(cp)); |
2909 DCHECK(ToRegister(instr->global_object()) | 2909 DCHECK(ToRegister(instr->global_object()) |
2910 .is(LoadDescriptor::ReceiverRegister())); | 2910 .is(LoadDescriptor::ReceiverRegister())); |
2911 DCHECK(ToRegister(instr->result()).is(r3)); | 2911 DCHECK(ToRegister(instr->result()).is(r3)); |
(...skipping 3217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6129 __ Push(scope_info); | 6129 __ Push(scope_info); |
6130 __ push(ToRegister(instr->function())); | 6130 __ push(ToRegister(instr->function())); |
6131 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6131 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6132 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6132 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6133 } | 6133 } |
6134 | 6134 |
6135 | 6135 |
6136 #undef __ | 6136 #undef __ |
6137 } // namespace internal | 6137 } // namespace internal |
6138 } // namespace v8 | 6138 } // namespace v8 |
OLD | NEW |