| 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 #include "src/arm/lithium-arm.h" | 7 #include "src/arm/lithium-arm.h" |
| 8 #include "src/arm/lithium-codegen-arm.h" | 8 #include "src/arm/lithium-codegen-arm.h" |
| 9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
| (...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 return instr->RequiresHoleCheck() | 2080 return instr->RequiresHoleCheck() |
| 2081 ? AssignEnvironment(DefineAsRegister(result)) | 2081 ? AssignEnvironment(DefineAsRegister(result)) |
| 2082 : DefineAsRegister(result); | 2082 : DefineAsRegister(result); |
| 2083 } | 2083 } |
| 2084 | 2084 |
| 2085 | 2085 |
| 2086 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2086 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2087 LOperand* context = UseFixed(instr->context(), cp); | 2087 LOperand* context = UseFixed(instr->context(), cp); |
| 2088 LOperand* global_object = UseFixed(instr->global_object(), | 2088 LOperand* global_object = UseFixed(instr->global_object(), |
| 2089 LoadIC::ReceiverRegister()); | 2089 LoadIC::ReceiverRegister()); |
| 2090 LOperand* vector = NULL; |
| 2091 if (FLAG_vector_ics) { |
| 2092 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2093 } |
| 2090 LLoadGlobalGeneric* result = | 2094 LLoadGlobalGeneric* result = |
| 2091 new(zone()) LLoadGlobalGeneric(context, global_object); | 2095 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2092 return MarkAsCall(DefineFixed(result, r0), instr); | 2096 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2093 } | 2097 } |
| 2094 | 2098 |
| 2095 | 2099 |
| 2096 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2100 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| 2097 LOperand* value = UseRegister(instr->value()); | 2101 LOperand* value = UseRegister(instr->value()); |
| 2098 // Use a temp to check the value in the cell in the case where we perform | 2102 // Use a temp to check the value in the cell in the case where we perform |
| 2099 // a hole check. | 2103 // a hole check. |
| 2100 return instr->RequiresHoleCheck() | 2104 return instr->RequiresHoleCheck() |
| 2101 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) | 2105 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 | 2138 |
| 2135 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2139 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 2136 LOperand* obj = UseRegisterAtStart(instr->object()); | 2140 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2137 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2141 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2138 } | 2142 } |
| 2139 | 2143 |
| 2140 | 2144 |
| 2141 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2145 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2142 LOperand* context = UseFixed(instr->context(), cp); | 2146 LOperand* context = UseFixed(instr->context(), cp); |
| 2143 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2147 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2148 LOperand* vector = NULL; |
| 2149 if (FLAG_vector_ics) { |
| 2150 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2151 } |
| 2152 |
| 2144 LInstruction* result = | 2153 LInstruction* result = |
| 2145 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); | 2154 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), r0); |
| 2146 return MarkAsCall(result, instr); | 2155 return MarkAsCall(result, instr); |
| 2147 } | 2156 } |
| 2148 | 2157 |
| 2149 | 2158 |
| 2150 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2159 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2151 HLoadFunctionPrototype* instr) { | 2160 HLoadFunctionPrototype* instr) { |
| 2152 return AssignEnvironment(DefineAsRegister( | 2161 return AssignEnvironment(DefineAsRegister( |
| 2153 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 2162 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 2154 } | 2163 } |
| 2155 | 2164 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 result = AssignEnvironment(result); | 2204 result = AssignEnvironment(result); |
| 2196 } | 2205 } |
| 2197 return result; | 2206 return result; |
| 2198 } | 2207 } |
| 2199 | 2208 |
| 2200 | 2209 |
| 2201 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2210 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2202 LOperand* context = UseFixed(instr->context(), cp); | 2211 LOperand* context = UseFixed(instr->context(), cp); |
| 2203 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2212 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 2204 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2213 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); |
| 2214 LOperand* vector = NULL; |
| 2215 if (FLAG_vector_ics) { |
| 2216 vector = FixedTemp(LoadIC::VectorRegister()); |
| 2217 } |
| 2205 | 2218 |
| 2206 LInstruction* result = | 2219 LInstruction* result = |
| 2207 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), r0); | 2220 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
| 2221 r0); |
| 2208 return MarkAsCall(result, instr); | 2222 return MarkAsCall(result, instr); |
| 2209 } | 2223 } |
| 2210 | 2224 |
| 2211 | 2225 |
| 2212 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2226 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2213 if (!instr->is_typed_elements()) { | 2227 if (!instr->is_typed_elements()) { |
| 2214 ASSERT(instr->elements()->representation().IsTagged()); | 2228 ASSERT(instr->elements()->representation().IsTagged()); |
| 2215 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2229 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 2216 LOperand* object = NULL; | 2230 LOperand* object = NULL; |
| 2217 LOperand* key = NULL; | 2231 LOperand* key = NULL; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2589 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2603 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
| 2590 HAllocateBlockContext* instr) { | 2604 HAllocateBlockContext* instr) { |
| 2591 LOperand* context = UseFixed(instr->context(), cp); | 2605 LOperand* context = UseFixed(instr->context(), cp); |
| 2592 LOperand* function = UseRegisterAtStart(instr->function()); | 2606 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2593 LAllocateBlockContext* result = | 2607 LAllocateBlockContext* result = |
| 2594 new(zone()) LAllocateBlockContext(context, function); | 2608 new(zone()) LAllocateBlockContext(context, function); |
| 2595 return MarkAsCall(DefineFixed(result, cp), instr); | 2609 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2596 } | 2610 } |
| 2597 | 2611 |
| 2598 } } // namespace v8::internal | 2612 } } // namespace v8::internal |
| OLD | NEW |