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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/ia32/lithium-codegen-ia32.h" | 10 #include "src/ia32/lithium-codegen-ia32.h" |
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2085 return instr->RequiresHoleCheck() | 2085 return instr->RequiresHoleCheck() |
2086 ? AssignEnvironment(DefineAsRegister(result)) | 2086 ? AssignEnvironment(DefineAsRegister(result)) |
2087 : DefineAsRegister(result); | 2087 : DefineAsRegister(result); |
2088 } | 2088 } |
2089 | 2089 |
2090 | 2090 |
2091 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2091 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2092 LOperand* context = UseFixed(instr->context(), esi); | 2092 LOperand* context = UseFixed(instr->context(), esi); |
2093 LOperand* global_object = UseFixed(instr->global_object(), | 2093 LOperand* global_object = UseFixed(instr->global_object(), |
2094 LoadIC::ReceiverRegister()); | 2094 LoadIC::ReceiverRegister()); |
| 2095 LOperand* vector = NULL; |
| 2096 if (FLAG_vector_ics) { |
| 2097 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2098 } |
| 2099 |
2095 LLoadGlobalGeneric* result = | 2100 LLoadGlobalGeneric* result = |
2096 new(zone()) LLoadGlobalGeneric(context, global_object); | 2101 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
2097 return MarkAsCall(DefineFixed(result, eax), instr); | 2102 return MarkAsCall(DefineFixed(result, eax), instr); |
2098 } | 2103 } |
2099 | 2104 |
2100 | 2105 |
2101 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2106 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2102 LStoreGlobalCell* result = | 2107 LStoreGlobalCell* result = |
2103 new(zone()) LStoreGlobalCell(UseRegister(instr->value())); | 2108 new(zone()) LStoreGlobalCell(UseRegister(instr->value())); |
2104 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; | 2109 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
2105 } | 2110 } |
2106 | 2111 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 instr->access().offset() == 0) | 2145 instr->access().offset() == 0) |
2141 ? UseRegisterOrConstantAtStart(instr->object()) | 2146 ? UseRegisterOrConstantAtStart(instr->object()) |
2142 : UseRegisterAtStart(instr->object()); | 2147 : UseRegisterAtStart(instr->object()); |
2143 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2148 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2144 } | 2149 } |
2145 | 2150 |
2146 | 2151 |
2147 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2152 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2148 LOperand* context = UseFixed(instr->context(), esi); | 2153 LOperand* context = UseFixed(instr->context(), esi); |
2149 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2154 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
2150 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(context, object); | 2155 LOperand* vector = NULL; |
| 2156 if (FLAG_vector_ics) { |
| 2157 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2158 } |
| 2159 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
| 2160 context, object, vector); |
2151 return MarkAsCall(DefineFixed(result, eax), instr); | 2161 return MarkAsCall(DefineFixed(result, eax), instr); |
2152 } | 2162 } |
2153 | 2163 |
2154 | 2164 |
2155 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2165 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2156 HLoadFunctionPrototype* instr) { | 2166 HLoadFunctionPrototype* instr) { |
2157 return AssignEnvironment(DefineAsRegister( | 2167 return AssignEnvironment(DefineAsRegister( |
2158 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), | 2168 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), |
2159 TempRegister()))); | 2169 TempRegister()))); |
2160 } | 2170 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 result = AssignEnvironment(result); | 2209 result = AssignEnvironment(result); |
2200 } | 2210 } |
2201 return result; | 2211 return result; |
2202 } | 2212 } |
2203 | 2213 |
2204 | 2214 |
2205 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2215 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2206 LOperand* context = UseFixed(instr->context(), esi); | 2216 LOperand* context = UseFixed(instr->context(), esi); |
2207 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2217 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
2208 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2218 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); |
2209 | 2219 LOperand* vector = NULL; |
| 2220 if (FLAG_vector_ics) { |
| 2221 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2222 } |
2210 LLoadKeyedGeneric* result = | 2223 LLoadKeyedGeneric* result = |
2211 new(zone()) LLoadKeyedGeneric(context, object, key); | 2224 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
2212 return MarkAsCall(DefineFixed(result, eax), instr); | 2225 return MarkAsCall(DefineFixed(result, eax), instr); |
2213 } | 2226 } |
2214 | 2227 |
2215 | 2228 |
2216 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { | 2229 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { |
2217 ElementsKind elements_kind = instr->elements_kind(); | 2230 ElementsKind elements_kind = instr->elements_kind(); |
2218 | 2231 |
2219 // Determine if we need a byte register in this case for the value. | 2232 // Determine if we need a byte register in this case for the value. |
2220 bool val_is_fixed_register = | 2233 bool val_is_fixed_register = |
2221 elements_kind == EXTERNAL_INT8_ELEMENTS || | 2234 elements_kind == EXTERNAL_INT8_ELEMENTS || |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2668 LOperand* function = UseRegisterAtStart(instr->function()); | 2681 LOperand* function = UseRegisterAtStart(instr->function()); |
2669 LAllocateBlockContext* result = | 2682 LAllocateBlockContext* result = |
2670 new(zone()) LAllocateBlockContext(context, function); | 2683 new(zone()) LAllocateBlockContext(context, function); |
2671 return MarkAsCall(DefineFixed(result, esi), instr); | 2684 return MarkAsCall(DefineFixed(result, esi), instr); |
2672 } | 2685 } |
2673 | 2686 |
2674 | 2687 |
2675 } } // namespace v8::internal | 2688 } } // namespace v8::internal |
2676 | 2689 |
2677 #endif // V8_TARGET_ARCH_IA32 | 2690 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |