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_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2072 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
2073 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 2073 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
2074 return instr->RequiresHoleCheck() | 2074 return instr->RequiresHoleCheck() |
2075 ? AssignEnvironment(DefineAsRegister(result)) | 2075 ? AssignEnvironment(DefineAsRegister(result)) |
2076 : DefineAsRegister(result); | 2076 : DefineAsRegister(result); |
2077 } | 2077 } |
2078 | 2078 |
2079 | 2079 |
2080 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2080 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2081 LOperand* context = UseFixed(instr->context(), esi); | 2081 LOperand* context = UseFixed(instr->context(), esi); |
2082 LOperand* global_object = UseFixed(instr->global_object(), | 2082 LOperand* global_object = |
2083 LoadIC::ReceiverRegister()); | 2083 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); |
2084 LOperand* vector = NULL; | 2084 LOperand* vector = NULL; |
2085 if (FLAG_vector_ics) { | 2085 if (FLAG_vector_ics) { |
2086 vector = FixedTemp(LoadIC::VectorRegister()); | 2086 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
2087 } | 2087 } |
2088 | 2088 |
2089 LLoadGlobalGeneric* result = | 2089 LLoadGlobalGeneric* result = |
2090 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2090 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
2091 return MarkAsCall(DefineFixed(result, eax), instr); | 2091 return MarkAsCall(DefineFixed(result, eax), instr); |
2092 } | 2092 } |
2093 | 2093 |
2094 | 2094 |
2095 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2095 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2096 LStoreGlobalCell* result = | 2096 LStoreGlobalCell* result = |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2133 LOperand* obj = (instr->access().IsExternalMemory() && | 2133 LOperand* obj = (instr->access().IsExternalMemory() && |
2134 instr->access().offset() == 0) | 2134 instr->access().offset() == 0) |
2135 ? UseRegisterOrConstantAtStart(instr->object()) | 2135 ? UseRegisterOrConstantAtStart(instr->object()) |
2136 : UseRegisterAtStart(instr->object()); | 2136 : UseRegisterAtStart(instr->object()); |
2137 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2137 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2138 } | 2138 } |
2139 | 2139 |
2140 | 2140 |
2141 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2141 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2142 LOperand* context = UseFixed(instr->context(), esi); | 2142 LOperand* context = UseFixed(instr->context(), esi); |
2143 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2143 LOperand* object = |
| 2144 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); |
2144 LOperand* vector = NULL; | 2145 LOperand* vector = NULL; |
2145 if (FLAG_vector_ics) { | 2146 if (FLAG_vector_ics) { |
2146 vector = FixedTemp(LoadIC::VectorRegister()); | 2147 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
2147 } | 2148 } |
2148 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( | 2149 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric( |
2149 context, object, vector); | 2150 context, object, vector); |
2150 return MarkAsCall(DefineFixed(result, eax), instr); | 2151 return MarkAsCall(DefineFixed(result, eax), instr); |
2151 } | 2152 } |
2152 | 2153 |
2153 | 2154 |
2154 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2155 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2155 HLoadFunctionPrototype* instr) { | 2156 HLoadFunctionPrototype* instr) { |
2156 return AssignEnvironment(DefineAsRegister( | 2157 return AssignEnvironment(DefineAsRegister( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2196 // LCodeGen::DoLoadKeyedFixedArray | 2197 // LCodeGen::DoLoadKeyedFixedArray |
2197 instr->RequiresHoleCheck()) { | 2198 instr->RequiresHoleCheck()) { |
2198 result = AssignEnvironment(result); | 2199 result = AssignEnvironment(result); |
2199 } | 2200 } |
2200 return result; | 2201 return result; |
2201 } | 2202 } |
2202 | 2203 |
2203 | 2204 |
2204 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2205 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2205 LOperand* context = UseFixed(instr->context(), esi); | 2206 LOperand* context = UseFixed(instr->context(), esi); |
2206 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2207 LOperand* object = |
2207 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2208 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); |
| 2209 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); |
2208 LOperand* vector = NULL; | 2210 LOperand* vector = NULL; |
2209 if (FLAG_vector_ics) { | 2211 if (FLAG_vector_ics) { |
2210 vector = FixedTemp(LoadIC::VectorRegister()); | 2212 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
2211 } | 2213 } |
2212 LLoadKeyedGeneric* result = | 2214 LLoadKeyedGeneric* result = |
2213 new(zone()) LLoadKeyedGeneric(context, object, key, vector); | 2215 new(zone()) LLoadKeyedGeneric(context, object, key, vector); |
2214 return MarkAsCall(DefineFixed(result, eax), instr); | 2216 return MarkAsCall(DefineFixed(result, eax), instr); |
2215 } | 2217 } |
2216 | 2218 |
2217 | 2219 |
2218 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { | 2220 LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) { |
2219 ElementsKind elements_kind = instr->elements_kind(); | 2221 ElementsKind elements_kind = instr->elements_kind(); |
2220 | 2222 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 instr->key()->representation(), elements_kind); | 2287 instr->key()->representation(), elements_kind); |
2286 LOperand* key = clobbers_key | 2288 LOperand* key = clobbers_key |
2287 ? UseTempRegister(instr->key()) | 2289 ? UseTempRegister(instr->key()) |
2288 : UseRegisterOrConstantAtStart(instr->key()); | 2290 : UseRegisterOrConstantAtStart(instr->key()); |
2289 return new(zone()) LStoreKeyed(backing_store, key, val); | 2291 return new(zone()) LStoreKeyed(backing_store, key, val); |
2290 } | 2292 } |
2291 | 2293 |
2292 | 2294 |
2293 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2295 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
2294 LOperand* context = UseFixed(instr->context(), esi); | 2296 LOperand* context = UseFixed(instr->context(), esi); |
2295 LOperand* object = UseFixed(instr->object(), | 2297 LOperand* object = |
2296 KeyedStoreIC::ReceiverRegister()); | 2298 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); |
2297 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); | 2299 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); |
2298 LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); | 2300 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); |
2299 | 2301 |
2300 DCHECK(instr->object()->representation().IsTagged()); | 2302 DCHECK(instr->object()->representation().IsTagged()); |
2301 DCHECK(instr->key()->representation().IsTagged()); | 2303 DCHECK(instr->key()->representation().IsTagged()); |
2302 DCHECK(instr->value()->representation().IsTagged()); | 2304 DCHECK(instr->value()->representation().IsTagged()); |
2303 | 2305 |
2304 LStoreKeyedGeneric* result = | 2306 LStoreKeyedGeneric* result = |
2305 new(zone()) LStoreKeyedGeneric(context, object, key, value); | 2307 new(zone()) LStoreKeyedGeneric(context, object, key, value); |
2306 return MarkAsCall(result, instr); | 2308 return MarkAsCall(result, instr); |
2307 } | 2309 } |
2308 | 2310 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2390 | 2392 |
2391 // We need a temporary register for write barrier of the map field. | 2393 // We need a temporary register for write barrier of the map field. |
2392 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2394 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
2393 | 2395 |
2394 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); | 2396 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
2395 } | 2397 } |
2396 | 2398 |
2397 | 2399 |
2398 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2400 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2399 LOperand* context = UseFixed(instr->context(), esi); | 2401 LOperand* context = UseFixed(instr->context(), esi); |
2400 LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister()); | 2402 LOperand* object = |
2401 LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister()); | 2403 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); |
| 2404 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); |
2402 | 2405 |
2403 LStoreNamedGeneric* result = | 2406 LStoreNamedGeneric* result = |
2404 new(zone()) LStoreNamedGeneric(context, object, value); | 2407 new(zone()) LStoreNamedGeneric(context, object, value); |
2405 return MarkAsCall(result, instr); | 2408 return MarkAsCall(result, instr); |
2406 } | 2409 } |
2407 | 2410 |
2408 | 2411 |
2409 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2412 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2410 LOperand* context = UseFixed(instr->context(), esi); | 2413 LOperand* context = UseFixed(instr->context(), esi); |
2411 LOperand* left = UseFixed(instr->left(), edx); | 2414 LOperand* left = UseFixed(instr->left(), edx); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 LOperand* function = UseRegisterAtStart(instr->function()); | 2677 LOperand* function = UseRegisterAtStart(instr->function()); |
2675 LAllocateBlockContext* result = | 2678 LAllocateBlockContext* result = |
2676 new(zone()) LAllocateBlockContext(context, function); | 2679 new(zone()) LAllocateBlockContext(context, function); |
2677 return MarkAsCall(DefineFixed(result, esi), instr); | 2680 return MarkAsCall(DefineFixed(result, esi), instr); |
2678 } | 2681 } |
2679 | 2682 |
2680 | 2683 |
2681 } } // namespace v8::internal | 2684 } } // namespace v8::internal |
2682 | 2685 |
2683 #endif // V8_TARGET_ARCH_X87 | 2686 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |