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 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 } | 1131 } |
1132 | 1132 |
1133 | 1133 |
1134 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | 1134 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
1135 HTailCallThroughMegamorphicCache* instr) { | 1135 HTailCallThroughMegamorphicCache* instr) { |
1136 LOperand* context = UseFixed(instr->context(), esi); | 1136 LOperand* context = UseFixed(instr->context(), esi); |
1137 LOperand* receiver_register = | 1137 LOperand* receiver_register = |
1138 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | 1138 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
1139 LOperand* name_register = | 1139 LOperand* name_register = |
1140 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | 1140 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1141 LOperand* slot = NULL; |
| 1142 LOperand* vector = NULL; |
| 1143 if (FLAG_vector_ics) { |
| 1144 slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister()); |
| 1145 vector = |
| 1146 UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister()); |
| 1147 } |
| 1148 |
1141 // Not marked as call. It can't deoptimize, and it never returns. | 1149 // Not marked as call. It can't deoptimize, and it never returns. |
1142 return new (zone()) LTailCallThroughMegamorphicCache( | 1150 return new (zone()) LTailCallThroughMegamorphicCache( |
1143 context, receiver_register, name_register); | 1151 context, receiver_register, name_register, slot, vector); |
1144 } | 1152 } |
1145 | 1153 |
1146 | 1154 |
1147 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1155 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1148 LOperand* context = UseFixed(instr->context(), esi); | 1156 LOperand* context = UseFixed(instr->context(), esi); |
1149 LOperand* function = UseFixed(instr->function(), edi); | 1157 LOperand* function = UseFixed(instr->function(), edi); |
1150 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1158 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
1151 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1159 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1152 } | 1160 } |
1153 | 1161 |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 ? AssignEnvironment(DefineAsRegister(result)) | 2116 ? AssignEnvironment(DefineAsRegister(result)) |
2109 : DefineAsRegister(result); | 2117 : DefineAsRegister(result); |
2110 } | 2118 } |
2111 | 2119 |
2112 | 2120 |
2113 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2121 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2114 LOperand* context = UseFixed(instr->context(), esi); | 2122 LOperand* context = UseFixed(instr->context(), esi); |
2115 LOperand* global_object = | 2123 LOperand* global_object = |
2116 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2124 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
2117 LOperand* vector = NULL; | 2125 LOperand* vector = NULL; |
2118 if (FLAG_vector_ics) { | 2126 if (instr->HasVectorAndSlot()) { |
2119 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2127 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2120 } | 2128 } |
2121 | 2129 |
2122 LLoadGlobalGeneric* result = | 2130 LLoadGlobalGeneric* result = |
2123 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2131 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
2124 return MarkAsCall(DefineFixed(result, eax), instr); | 2132 return MarkAsCall(DefineFixed(result, eax), instr); |
2125 } | 2133 } |
2126 | 2134 |
2127 | 2135 |
2128 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2136 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2169 : UseRegisterAtStart(instr->object()); | 2177 : UseRegisterAtStart(instr->object()); |
2170 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2178 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2171 } | 2179 } |
2172 | 2180 |
2173 | 2181 |
2174 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2182 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2175 LOperand* context = UseFixed(instr->context(), esi); | 2183 LOperand* context = UseFixed(instr->context(), esi); |
2176 LOperand* object = | 2184 LOperand* object = |
2177 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2185 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2178 LOperand* vector = NULL; | 2186 LOperand* vector = NULL; |
2179 if (FLAG_vector_ics) { | 2187 if (instr->HasVectorAndSlot()) { |
2180 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2188 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2181 } | 2189 } |
2182 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( | 2190 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
2183 context, object, vector); | 2191 context, object, vector); |
2184 return MarkAsCall(DefineFixed(result, eax), instr); | 2192 return MarkAsCall(DefineFixed(result, eax), instr); |
2185 } | 2193 } |
2186 | 2194 |
2187 | 2195 |
2188 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2196 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2189 HLoadFunctionPrototype* instr) { | 2197 HLoadFunctionPrototype* instr) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 return result; | 2242 return result; |
2235 } | 2243 } |
2236 | 2244 |
2237 | 2245 |
2238 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2246 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2239 LOperand* context = UseFixed(instr->context(), esi); | 2247 LOperand* context = UseFixed(instr->context(), esi); |
2240 LOperand* object = | 2248 LOperand* object = |
2241 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2249 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2242 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2250 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
2243 LOperand* vector = NULL; | 2251 LOperand* vector = NULL; |
2244 if (FLAG_vector_ics) { | 2252 if (instr->HasVectorAndSlot()) { |
2245 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2253 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2246 } | 2254 } |
2247 LLoadKeyedGeneric* result = | 2255 LLoadKeyedGeneric* result = |
2248 new(zone()) LLoadKeyedGeneric(context, object, key, vector); | 2256 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
2249 return MarkAsCall(DefineFixed(result, eax), instr); | 2257 return MarkAsCall(DefineFixed(result, eax), instr); |
2250 } | 2258 } |
2251 | 2259 |
2252 | 2260 |
2253 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { | 2261 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { |
2254 ElementsKind elements_kind = instr->elements_kind(); | 2262 ElementsKind elements_kind = instr->elements_kind(); |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 LOperand* function = UseRegisterAtStart(instr->function()); | 2713 LOperand* function = UseRegisterAtStart(instr->function()); |
2706 LAllocateBlockContext* result = | 2714 LAllocateBlockContext* result = |
2707 new(zone()) LAllocateBlockContext(context, function); | 2715 new(zone()) LAllocateBlockContext(context, function); |
2708 return MarkAsCall(DefineFixed(result, esi), instr); | 2716 return MarkAsCall(DefineFixed(result, esi), instr); |
2709 } | 2717 } |
2710 | 2718 |
2711 | 2719 |
2712 } } // namespace v8::internal | 2720 } } // namespace v8::internal |
2713 | 2721 |
2714 #endif // V8_TARGET_ARCH_IA32 | 2722 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |