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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/arm/lithium-codegen-arm.h" | 9 #include "src/arm/lithium-codegen-arm.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 } | 1091 } |
1092 | 1092 |
1093 | 1093 |
1094 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | 1094 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
1095 HTailCallThroughMegamorphicCache* instr) { | 1095 HTailCallThroughMegamorphicCache* instr) { |
1096 LOperand* context = UseFixed(instr->context(), cp); | 1096 LOperand* context = UseFixed(instr->context(), cp); |
1097 LOperand* receiver_register = | 1097 LOperand* receiver_register = |
1098 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | 1098 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
1099 LOperand* name_register = | 1099 LOperand* name_register = |
1100 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | 1100 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1101 LOperand* slot = NULL; |
| 1102 LOperand* vector = NULL; |
| 1103 if (FLAG_vector_ics) { |
| 1104 slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister()); |
| 1105 vector = |
| 1106 UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister()); |
| 1107 } |
| 1108 |
1101 // Not marked as call. It can't deoptimize, and it never returns. | 1109 // Not marked as call. It can't deoptimize, and it never returns. |
1102 return new (zone()) LTailCallThroughMegamorphicCache( | 1110 return new (zone()) LTailCallThroughMegamorphicCache( |
1103 context, receiver_register, name_register); | 1111 context, receiver_register, name_register, slot, vector); |
1104 } | 1112 } |
1105 | 1113 |
1106 | 1114 |
1107 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1115 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1108 LOperand* context = UseFixed(instr->context(), cp); | 1116 LOperand* context = UseFixed(instr->context(), cp); |
1109 LOperand* function = UseFixed(instr->function(), r1); | 1117 LOperand* function = UseFixed(instr->function(), r1); |
1110 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1118 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
1111 return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1119 return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1112 } | 1120 } |
1113 | 1121 |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 ? AssignEnvironment(DefineAsRegister(result)) | 2120 ? AssignEnvironment(DefineAsRegister(result)) |
2113 : DefineAsRegister(result); | 2121 : DefineAsRegister(result); |
2114 } | 2122 } |
2115 | 2123 |
2116 | 2124 |
2117 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2125 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2118 LOperand* context = UseFixed(instr->context(), cp); | 2126 LOperand* context = UseFixed(instr->context(), cp); |
2119 LOperand* global_object = | 2127 LOperand* global_object = |
2120 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2128 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
2121 LOperand* vector = NULL; | 2129 LOperand* vector = NULL; |
2122 if (FLAG_vector_ics) { | 2130 if (instr->HasVectorAndSlot()) { |
2123 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2131 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2124 } | 2132 } |
2125 LLoadGlobalGeneric* result = | 2133 LLoadGlobalGeneric* result = |
2126 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2134 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
2127 return MarkAsCall(DefineFixed(result, r0), instr); | 2135 return MarkAsCall(DefineFixed(result, r0), instr); |
2128 } | 2136 } |
2129 | 2137 |
2130 | 2138 |
2131 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2139 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2132 LOperand* value = UseRegister(instr->value()); | 2140 LOperand* value = UseRegister(instr->value()); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2171 LOperand* obj = UseRegisterAtStart(instr->object()); | 2179 LOperand* obj = UseRegisterAtStart(instr->object()); |
2172 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2180 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2173 } | 2181 } |
2174 | 2182 |
2175 | 2183 |
2176 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2184 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2177 LOperand* context = UseFixed(instr->context(), cp); | 2185 LOperand* context = UseFixed(instr->context(), cp); |
2178 LOperand* object = | 2186 LOperand* object = |
2179 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2187 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2180 LOperand* vector = NULL; | 2188 LOperand* vector = NULL; |
2181 if (FLAG_vector_ics) { | 2189 if (instr->HasVectorAndSlot()) { |
2182 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2190 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2183 } | 2191 } |
2184 | 2192 |
2185 LInstruction* result = | 2193 LInstruction* result = |
2186 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0); | 2194 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0); |
2187 return MarkAsCall(result, instr); | 2195 return MarkAsCall(result, instr); |
2188 } | 2196 } |
2189 | 2197 |
2190 | 2198 |
2191 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2199 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 return result; | 2246 return result; |
2239 } | 2247 } |
2240 | 2248 |
2241 | 2249 |
2242 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2250 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2243 LOperand* context = UseFixed(instr->context(), cp); | 2251 LOperand* context = UseFixed(instr->context(), cp); |
2244 LOperand* object = | 2252 LOperand* object = |
2245 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2253 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2246 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2254 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
2247 LOperand* vector = NULL; | 2255 LOperand* vector = NULL; |
2248 if (FLAG_vector_ics) { | 2256 if (instr->HasVectorAndSlot()) { |
2249 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2257 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2250 } | 2258 } |
2251 | 2259 |
2252 LInstruction* result = | 2260 LInstruction* result = |
2253 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), | 2261 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
2254 r0); | 2262 r0); |
2255 return MarkAsCall(result, instr); | 2263 return MarkAsCall(result, instr); |
2256 } | 2264 } |
2257 | 2265 |
2258 | 2266 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2639 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2647 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2640 HAllocateBlockContext* instr) { | 2648 HAllocateBlockContext* instr) { |
2641 LOperand* context = UseFixed(instr->context(), cp); | 2649 LOperand* context = UseFixed(instr->context(), cp); |
2642 LOperand* function = UseRegisterAtStart(instr->function()); | 2650 LOperand* function = UseRegisterAtStart(instr->function()); |
2643 LAllocateBlockContext* result = | 2651 LAllocateBlockContext* result = |
2644 new(zone()) LAllocateBlockContext(context, function); | 2652 new(zone()) LAllocateBlockContext(context, function); |
2645 return MarkAsCall(DefineFixed(result, cp), instr); | 2653 return MarkAsCall(DefineFixed(result, cp), instr); |
2646 } | 2654 } |
2647 | 2655 |
2648 } } // namespace v8::internal | 2656 } } // namespace v8::internal |
OLD | NEW |