| 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_X87 | 9 #if V8_TARGET_ARCH_X87 |
| 10 | 10 |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 | 1152 |
| 1153 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | 1153 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
| 1154 HTailCallThroughMegamorphicCache* instr) { | 1154 HTailCallThroughMegamorphicCache* instr) { |
| 1155 LOperand* context = UseFixed(instr->context(), esi); | 1155 LOperand* context = UseFixed(instr->context(), esi); |
| 1156 LOperand* receiver_register = | 1156 LOperand* receiver_register = |
| 1157 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | 1157 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
| 1158 LOperand* name_register = | 1158 LOperand* name_register = |
| 1159 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | 1159 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1160 LOperand* slot = NULL; |
| 1161 LOperand* vector = NULL; |
| 1162 if (FLAG_vector_ics) { |
| 1163 slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister()); |
| 1164 vector = |
| 1165 UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister()); |
| 1166 } |
| 1167 |
| 1160 // Not marked as call. It can't deoptimize, and it never returns. | 1168 // Not marked as call. It can't deoptimize, and it never returns. |
| 1161 return new (zone()) LTailCallThroughMegamorphicCache( | 1169 return new (zone()) LTailCallThroughMegamorphicCache( |
| 1162 context, receiver_register, name_register); | 1170 context, receiver_register, name_register, slot, vector); |
| 1163 } | 1171 } |
| 1164 | 1172 |
| 1165 | 1173 |
| 1166 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1174 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1167 LOperand* context = UseFixed(instr->context(), esi); | 1175 LOperand* context = UseFixed(instr->context(), esi); |
| 1168 LOperand* function = UseFixed(instr->function(), edi); | 1176 LOperand* function = UseFixed(instr->function(), edi); |
| 1169 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1177 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
| 1170 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1178 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1171 } | 1179 } |
| 1172 | 1180 |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 ? AssignEnvironment(DefineAsRegister(result)) | 2114 ? AssignEnvironment(DefineAsRegister(result)) |
| 2107 : DefineAsRegister(result); | 2115 : DefineAsRegister(result); |
| 2108 } | 2116 } |
| 2109 | 2117 |
| 2110 | 2118 |
| 2111 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2119 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2112 LOperand* context = UseFixed(instr->context(), esi); | 2120 LOperand* context = UseFixed(instr->context(), esi); |
| 2113 LOperand* global_object = | 2121 LOperand* global_object = |
| 2114 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2122 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 2115 LOperand* vector = NULL; | 2123 LOperand* vector = NULL; |
| 2116 if (FLAG_vector_ics) { | 2124 if (instr->HasVectorAndSlot()) { |
| 2117 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2125 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2118 } | 2126 } |
| 2119 | 2127 |
| 2120 LLoadGlobalGeneric* result = | 2128 LLoadGlobalGeneric* result = |
| 2121 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2129 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2122 return MarkAsCall(DefineFixed(result, eax), instr); | 2130 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2123 } | 2131 } |
| 2124 | 2132 |
| 2125 | 2133 |
| 2126 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2134 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 : UseRegisterAtStart(instr->object()); | 2175 : UseRegisterAtStart(instr->object()); |
| 2168 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2176 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2169 } | 2177 } |
| 2170 | 2178 |
| 2171 | 2179 |
| 2172 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2180 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2173 LOperand* context = UseFixed(instr->context(), esi); | 2181 LOperand* context = UseFixed(instr->context(), esi); |
| 2174 LOperand* object = | 2182 LOperand* object = |
| 2175 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2183 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2176 LOperand* vector = NULL; | 2184 LOperand* vector = NULL; |
| 2177 if (FLAG_vector_ics) { | 2185 if (instr->HasVectorAndSlot()) { |
| 2178 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2186 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2179 } | 2187 } |
| 2180 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( | 2188 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
| 2181 context, object, vector); | 2189 context, object, vector); |
| 2182 return MarkAsCall(DefineFixed(result, eax), instr); | 2190 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2183 } | 2191 } |
| 2184 | 2192 |
| 2185 | 2193 |
| 2186 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2194 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2187 HLoadFunctionPrototype* instr) { | 2195 HLoadFunctionPrototype* instr) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 return result; | 2240 return result; |
| 2233 } | 2241 } |
| 2234 | 2242 |
| 2235 | 2243 |
| 2236 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2244 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2237 LOperand* context = UseFixed(instr->context(), esi); | 2245 LOperand* context = UseFixed(instr->context(), esi); |
| 2238 LOperand* object = | 2246 LOperand* object = |
| 2239 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2247 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2240 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2248 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
| 2241 LOperand* vector = NULL; | 2249 LOperand* vector = NULL; |
| 2242 if (FLAG_vector_ics) { | 2250 if (instr->HasVectorAndSlot()) { |
| 2243 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2251 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2244 } | 2252 } |
| 2245 LLoadKeyedGeneric* result = | 2253 LLoadKeyedGeneric* result = |
| 2246 new(zone()) LLoadKeyedGeneric(context, object, key, vector); | 2254 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
| 2247 return MarkAsCall(DefineFixed(result, eax), instr); | 2255 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2248 } | 2256 } |
| 2249 | 2257 |
| 2250 | 2258 |
| 2251 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { | 2259 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { |
| 2252 ElementsKind elements_kind = instr->elements_kind(); | 2260 ElementsKind elements_kind = instr->elements_kind(); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 LOperand* function = UseRegisterAtStart(instr->function()); | 2717 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2710 LAllocateBlockContext* result = | 2718 LAllocateBlockContext* result = |
| 2711 new(zone()) LAllocateBlockContext(context, function); | 2719 new(zone()) LAllocateBlockContext(context, function); |
| 2712 return MarkAsCall(DefineFixed(result, esi), instr); | 2720 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2713 } | 2721 } |
| 2714 | 2722 |
| 2715 | 2723 |
| 2716 } } // namespace v8::internal | 2724 } } // namespace v8::internal |
| 2717 | 2725 |
| 2718 #endif // V8_TARGET_ARCH_X87 | 2726 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |