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 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2077 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
2078 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 2078 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
2079 return instr->RequiresHoleCheck() | 2079 return instr->RequiresHoleCheck() |
2080 ? AssignEnvironment(DefineAsRegister(result)) | 2080 ? AssignEnvironment(DefineAsRegister(result)) |
2081 : DefineAsRegister(result); | 2081 : DefineAsRegister(result); |
2082 } | 2082 } |
2083 | 2083 |
2084 | 2084 |
2085 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2085 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
2086 LOperand* context = UseFixed(instr->context(), cp); | 2086 LOperand* context = UseFixed(instr->context(), cp); |
2087 LOperand* global_object = UseFixed(instr->global_object(), r0); | 2087 LOperand* global_object = UseFixed(instr->global_object(), |
| 2088 LoadIC::ReceiverRegister()); |
2088 LLoadGlobalGeneric* result = | 2089 LLoadGlobalGeneric* result = |
2089 new(zone()) LLoadGlobalGeneric(context, global_object); | 2090 new(zone()) LLoadGlobalGeneric(context, global_object); |
2090 return MarkAsCall(DefineFixed(result, r0), instr); | 2091 return MarkAsCall(DefineFixed(result, r0), instr); |
2091 } | 2092 } |
2092 | 2093 |
2093 | 2094 |
2094 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2095 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2095 LOperand* value = UseRegister(instr->value()); | 2096 LOperand* value = UseRegister(instr->value()); |
2096 // Use a temp to check the value in the cell in the case where we perform | 2097 // Use a temp to check the value in the cell in the case where we perform |
2097 // a hole check. | 2098 // a hole check. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2131 | 2132 |
2132 | 2133 |
2133 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2134 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2134 LOperand* obj = UseRegisterAtStart(instr->object()); | 2135 LOperand* obj = UseRegisterAtStart(instr->object()); |
2135 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2136 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2136 } | 2137 } |
2137 | 2138 |
2138 | 2139 |
2139 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2140 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2140 LOperand* context = UseFixed(instr->context(), cp); | 2141 LOperand* context = UseFixed(instr->context(), cp); |
2141 LOperand* object = UseFixed(instr->object(), r0); | 2142 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
2142 LInstruction* result = | 2143 LInstruction* result = |
2143 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); | 2144 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); |
2144 return MarkAsCall(result, instr); | 2145 return MarkAsCall(result, instr); |
2145 } | 2146 } |
2146 | 2147 |
2147 | 2148 |
2148 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2149 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2149 HLoadFunctionPrototype* instr) { | 2150 HLoadFunctionPrototype* instr) { |
2150 return AssignEnvironment(DefineAsRegister( | 2151 return AssignEnvironment(DefineAsRegister( |
2151 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); | 2152 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 // LCodeGen::DoLoadKeyedFixedArray | 2192 // LCodeGen::DoLoadKeyedFixedArray |
2192 instr->RequiresHoleCheck()) { | 2193 instr->RequiresHoleCheck()) { |
2193 result = AssignEnvironment(result); | 2194 result = AssignEnvironment(result); |
2194 } | 2195 } |
2195 return result; | 2196 return result; |
2196 } | 2197 } |
2197 | 2198 |
2198 | 2199 |
2199 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2200 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2200 LOperand* context = UseFixed(instr->context(), cp); | 2201 LOperand* context = UseFixed(instr->context(), cp); |
2201 LOperand* object = UseFixed(instr->object(), r1); | 2202 LOperand* object = UseFixed(instr->object(), KeyedLoadIC::ReceiverRegister()); |
2202 LOperand* key = UseFixed(instr->key(), r0); | 2203 LOperand* key = UseFixed(instr->key(), KeyedLoadIC::NameRegister()); |
2203 | 2204 |
2204 LInstruction* result = | 2205 LInstruction* result = |
2205 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), r0); | 2206 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), r0); |
2206 return MarkAsCall(result, instr); | 2207 return MarkAsCall(result, instr); |
2207 } | 2208 } |
2208 | 2209 |
2209 | 2210 |
2210 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2211 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
2211 if (!instr->is_typed_elements()) { | 2212 if (!instr->is_typed_elements()) { |
2212 ASSERT(instr->elements()->representation().IsTagged()); | 2213 ASSERT(instr->elements()->representation().IsTagged()); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2588 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2588 HAllocateBlockContext* instr) { | 2589 HAllocateBlockContext* instr) { |
2589 LOperand* context = UseFixed(instr->context(), cp); | 2590 LOperand* context = UseFixed(instr->context(), cp); |
2590 LOperand* function = UseRegisterAtStart(instr->function()); | 2591 LOperand* function = UseRegisterAtStart(instr->function()); |
2591 LAllocateBlockContext* result = | 2592 LAllocateBlockContext* result = |
2592 new(zone()) LAllocateBlockContext(context, function); | 2593 new(zone()) LAllocateBlockContext(context, function); |
2593 return MarkAsCall(DefineFixed(result, cp), instr); | 2594 return MarkAsCall(DefineFixed(result, cp), instr); |
2594 } | 2595 } |
2595 | 2596 |
2596 } } // namespace v8::internal | 2597 } } // namespace v8::internal |
OLD | NEW |