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/lithium-allocator-inl.h" | 7 #include "src/lithium-allocator-inl.h" |
8 #include "src/arm/lithium-arm.h" | 8 #include "src/arm/lithium-arm.h" |
9 #include "src/arm/lithium-codegen-arm.h" | 9 #include "src/arm/lithium-codegen-arm.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2125 LInstruction* result = new(zone()) LStoreContextSlot(context, value); | 2125 LInstruction* result = new(zone()) LStoreContextSlot(context, value); |
2126 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2126 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
2127 result = AssignEnvironment(result); | 2127 result = AssignEnvironment(result); |
2128 } | 2128 } |
2129 return result; | 2129 return result; |
2130 } | 2130 } |
2131 | 2131 |
2132 | 2132 |
2133 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2133 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2134 LOperand* obj = UseRegisterAtStart(instr->object()); | 2134 LOperand* obj = UseRegisterAtStart(instr->object()); |
2135 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2135 HValue* h_obj_properties = instr->object_properties(); |
| 2136 LOperand* obj_properties = |
| 2137 (h_obj_properties != NULL) ? UseRegisterAtStart(h_obj_properties) : NULL; |
| 2138 return DefineAsRegister(new(zone()) LLoadNamedField(obj, obj_properties)); |
2136 } | 2139 } |
2137 | 2140 |
2138 | 2141 |
2139 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2142 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2140 LOperand* context = UseFixed(instr->context(), cp); | 2143 LOperand* context = UseFixed(instr->context(), cp); |
2141 LOperand* object = UseFixed(instr->object(), r0); | 2144 LOperand* object = UseFixed(instr->object(), r0); |
2142 LInstruction* result = | 2145 LInstruction* result = |
2143 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); | 2146 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); |
2144 return MarkAsCall(result, instr); | 2147 return MarkAsCall(result, instr); |
2145 } | 2148 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2316 val = UseTempRegister(instr->value()); | 2319 val = UseTempRegister(instr->value()); |
2317 } else if (instr->field_representation().IsDouble()) { | 2320 } else if (instr->field_representation().IsDouble()) { |
2318 val = UseRegisterAtStart(instr->value()); | 2321 val = UseRegisterAtStart(instr->value()); |
2319 } else { | 2322 } else { |
2320 val = UseRegister(instr->value()); | 2323 val = UseRegister(instr->value()); |
2321 } | 2324 } |
2322 | 2325 |
2323 // We need a temporary register for write barrier of the map field. | 2326 // We need a temporary register for write barrier of the map field. |
2324 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2327 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2325 | 2328 |
2326 return new(zone()) LStoreNamedField(obj, val, temp); | 2329 HValue* h_obj_properties = instr->object_properties(); |
| 2330 LOperand* obj_properties = |
| 2331 (h_obj_properties != NULL) ? UseRegister(h_obj_properties) : NULL; |
| 2332 |
| 2333 return new(zone()) LStoreNamedField(obj, val, temp, obj_properties); |
2327 } | 2334 } |
2328 | 2335 |
2329 | 2336 |
2330 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2337 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2331 LOperand* context = UseFixed(instr->context(), cp); | 2338 LOperand* context = UseFixed(instr->context(), cp); |
2332 LOperand* obj = UseFixed(instr->object(), r1); | 2339 LOperand* obj = UseFixed(instr->object(), r1); |
2333 LOperand* val = UseFixed(instr->value(), r0); | 2340 LOperand* val = UseFixed(instr->value(), r0); |
2334 | 2341 |
2335 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2342 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
2336 return MarkAsCall(result, instr); | 2343 return MarkAsCall(result, instr); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2589 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2596 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2590 HAllocateBlockContext* instr) { | 2597 HAllocateBlockContext* instr) { |
2591 LOperand* context = UseFixed(instr->context(), cp); | 2598 LOperand* context = UseFixed(instr->context(), cp); |
2592 LOperand* function = UseRegisterAtStart(instr->function()); | 2599 LOperand* function = UseRegisterAtStart(instr->function()); |
2593 LAllocateBlockContext* result = | 2600 LAllocateBlockContext* result = |
2594 new(zone()) LAllocateBlockContext(context, function); | 2601 new(zone()) LAllocateBlockContext(context, function); |
2595 return MarkAsCall(DefineFixed(result, cp), instr); | 2602 return MarkAsCall(DefineFixed(result, cp), instr); |
2596 } | 2603 } |
2597 | 2604 |
2598 } } // namespace v8::internal | 2605 } } // namespace v8::internal |
OLD | NEW |