OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
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 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 LInstruction* LChunkBuilder::DoTrapAllocationMemento( | 2315 LInstruction* LChunkBuilder::DoTrapAllocationMemento( |
2316 HTrapAllocationMemento* instr) { | 2316 HTrapAllocationMemento* instr) { |
2317 LOperand* object = UseRegister(instr->object()); | 2317 LOperand* object = UseRegister(instr->object()); |
2318 LOperand* temp = TempRegister(); | 2318 LOperand* temp = TempRegister(); |
2319 LTrapAllocationMemento* result = | 2319 LTrapAllocationMemento* result = |
2320 new (zone()) LTrapAllocationMemento(object, temp); | 2320 new (zone()) LTrapAllocationMemento(object, temp); |
2321 return AssignEnvironment(result); | 2321 return AssignEnvironment(result); |
2322 } | 2322 } |
2323 | 2323 |
2324 | 2324 |
| 2325 LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) { |
| 2326 info()->MarkAsDeferredCalling(); |
| 2327 LOperand* context = UseFixed(instr->context(), cp); |
| 2328 LOperand* object = Use(instr->object()); |
| 2329 LOperand* elements = Use(instr->elements()); |
| 2330 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2331 LOperand* current_capacity = UseRegisterOrConstant(instr->current_capacity()); |
| 2332 |
| 2333 LMaybeGrowElements* result = new (zone()) |
| 2334 LMaybeGrowElements(context, object, elements, key, current_capacity); |
| 2335 DefineFixed(result, r3); |
| 2336 return AssignPointerMap(AssignEnvironment(result)); |
| 2337 } |
| 2338 |
| 2339 |
2325 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2340 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2326 bool is_in_object = instr->access().IsInobject(); | 2341 bool is_in_object = instr->access().IsInobject(); |
2327 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2342 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2328 bool needs_write_barrier_for_map = | 2343 bool needs_write_barrier_for_map = |
2329 instr->has_transition() && instr->NeedsWriteBarrierForMap(); | 2344 instr->has_transition() && instr->NeedsWriteBarrierForMap(); |
2330 | 2345 |
2331 LOperand* obj; | 2346 LOperand* obj; |
2332 if (needs_write_barrier) { | 2347 if (needs_write_barrier) { |
2333 obj = is_in_object ? UseRegister(instr->object()) | 2348 obj = is_in_object ? UseRegister(instr->object()) |
2334 : UseTempRegister(instr->object()); | 2349 : UseTempRegister(instr->object()); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2614 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2629 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2615 HAllocateBlockContext* instr) { | 2630 HAllocateBlockContext* instr) { |
2616 LOperand* context = UseFixed(instr->context(), cp); | 2631 LOperand* context = UseFixed(instr->context(), cp); |
2617 LOperand* function = UseRegisterAtStart(instr->function()); | 2632 LOperand* function = UseRegisterAtStart(instr->function()); |
2618 LAllocateBlockContext* result = | 2633 LAllocateBlockContext* result = |
2619 new (zone()) LAllocateBlockContext(context, function); | 2634 new (zone()) LAllocateBlockContext(context, function); |
2620 return MarkAsCall(DefineFixed(result, cp), instr); | 2635 return MarkAsCall(DefineFixed(result, cp), instr); |
2621 } | 2636 } |
2622 } | 2637 } |
2623 } // namespace v8::internal | 2638 } // namespace v8::internal |
OLD | NEW |