| 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_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 | 1113 |
| 1114 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | 1114 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
| 1115 HTailCallThroughMegamorphicCache* instr) { | 1115 HTailCallThroughMegamorphicCache* instr) { |
| 1116 LOperand* context = UseFixed(instr->context(), rsi); | 1116 LOperand* context = UseFixed(instr->context(), rsi); |
| 1117 LOperand* receiver_register = | 1117 LOperand* receiver_register = |
| 1118 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | 1118 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
| 1119 LOperand* name_register = | 1119 LOperand* name_register = |
| 1120 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | 1120 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1121 LOperand* slot = NULL; |
| 1122 LOperand* vector = NULL; |
| 1123 if (FLAG_vector_ics) { |
| 1124 slot = UseFixed(instr->slot(), VectorLoadICDescriptor::SlotRegister()); |
| 1125 vector = |
| 1126 UseFixed(instr->vector(), VectorLoadICDescriptor::VectorRegister()); |
| 1127 } |
| 1128 |
| 1121 // Not marked as call. It can't deoptimize, and it never returns. | 1129 // Not marked as call. It can't deoptimize, and it never returns. |
| 1122 return new (zone()) LTailCallThroughMegamorphicCache( | 1130 return new (zone()) LTailCallThroughMegamorphicCache( |
| 1123 context, receiver_register, name_register); | 1131 context, receiver_register, name_register, slot, vector); |
| 1124 } | 1132 } |
| 1125 | 1133 |
| 1126 | 1134 |
| 1127 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1135 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1128 LOperand* context = UseFixed(instr->context(), rsi); | 1136 LOperand* context = UseFixed(instr->context(), rsi); |
| 1129 LOperand* function = UseFixed(instr->function(), rdi); | 1137 LOperand* function = UseFixed(instr->function(), rdi); |
| 1130 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1138 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
| 1131 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1139 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1132 } | 1140 } |
| 1133 | 1141 |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2060 ? AssignEnvironment(DefineAsRegister(result)) | 2068 ? AssignEnvironment(DefineAsRegister(result)) |
| 2061 : DefineAsRegister(result); | 2069 : DefineAsRegister(result); |
| 2062 } | 2070 } |
| 2063 | 2071 |
| 2064 | 2072 |
| 2065 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2073 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2066 LOperand* context = UseFixed(instr->context(), rsi); | 2074 LOperand* context = UseFixed(instr->context(), rsi); |
| 2067 LOperand* global_object = | 2075 LOperand* global_object = |
| 2068 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 2076 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 2069 LOperand* vector = NULL; | 2077 LOperand* vector = NULL; |
| 2070 if (FLAG_vector_ics) { | 2078 if (instr->HasVectorAndSlot()) { |
| 2071 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2079 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2072 } | 2080 } |
| 2073 | 2081 |
| 2074 LLoadGlobalGeneric* result = | 2082 LLoadGlobalGeneric* result = |
| 2075 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2083 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2076 return MarkAsCall(DefineFixed(result, rax), instr); | 2084 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2077 } | 2085 } |
| 2078 | 2086 |
| 2079 | 2087 |
| 2080 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2088 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 LOperand* obj = UseRegisterAtStart(instr->object()); | 2141 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2134 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2142 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2135 } | 2143 } |
| 2136 | 2144 |
| 2137 | 2145 |
| 2138 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2146 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2139 LOperand* context = UseFixed(instr->context(), rsi); | 2147 LOperand* context = UseFixed(instr->context(), rsi); |
| 2140 LOperand* object = | 2148 LOperand* object = |
| 2141 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2149 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2142 LOperand* vector = NULL; | 2150 LOperand* vector = NULL; |
| 2143 if (FLAG_vector_ics) { | 2151 if (instr->HasVectorAndSlot()) { |
| 2144 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2152 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2145 } | 2153 } |
| 2146 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( | 2154 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
| 2147 context, object, vector); | 2155 context, object, vector); |
| 2148 return MarkAsCall(DefineFixed(result, rax), instr); | 2156 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2149 } | 2157 } |
| 2150 | 2158 |
| 2151 | 2159 |
| 2152 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2160 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2153 HLoadFunctionPrototype* instr) { | 2161 HLoadFunctionPrototype* instr) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 return result; | 2234 return result; |
| 2227 } | 2235 } |
| 2228 | 2236 |
| 2229 | 2237 |
| 2230 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2238 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2231 LOperand* context = UseFixed(instr->context(), rsi); | 2239 LOperand* context = UseFixed(instr->context(), rsi); |
| 2232 LOperand* object = | 2240 LOperand* object = |
| 2233 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2241 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 2234 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2242 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
| 2235 LOperand* vector = NULL; | 2243 LOperand* vector = NULL; |
| 2236 if (FLAG_vector_ics) { | 2244 if (instr->HasVectorAndSlot()) { |
| 2237 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); | 2245 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 2238 } | 2246 } |
| 2239 | 2247 |
| 2240 LLoadKeyedGeneric* result = | 2248 LLoadKeyedGeneric* result = |
| 2241 new(zone()) LLoadKeyedGeneric(context, object, key, vector); | 2249 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
| 2242 return MarkAsCall(DefineFixed(result, rax), instr); | 2250 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2243 } | 2251 } |
| 2244 | 2252 |
| 2245 | 2253 |
| 2246 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2254 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2682 LOperand* function = UseRegisterAtStart(instr->function()); | 2690 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2683 LAllocateBlockContext* result = | 2691 LAllocateBlockContext* result = |
| 2684 new(zone()) LAllocateBlockContext(context, function); | 2692 new(zone()) LAllocateBlockContext(context, function); |
| 2685 return MarkAsCall(DefineFixed(result, rsi), instr); | 2693 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2686 } | 2694 } |
| 2687 | 2695 |
| 2688 | 2696 |
| 2689 } } // namespace v8::internal | 2697 } } // namespace v8::internal |
| 2690 | 2698 |
| 2691 #endif // V8_TARGET_ARCH_X64 | 2699 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |