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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
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 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 LInstruction* LChunkBuilder::DoTrapAllocationMemento( | 2362 LInstruction* LChunkBuilder::DoTrapAllocationMemento( |
2363 HTrapAllocationMemento* instr) { | 2363 HTrapAllocationMemento* instr) { |
2364 LOperand* object = UseRegister(instr->object()); | 2364 LOperand* object = UseRegister(instr->object()); |
2365 LOperand* temp = TempRegister(); | 2365 LOperand* temp = TempRegister(); |
2366 LTrapAllocationMemento* result = | 2366 LTrapAllocationMemento* result = |
2367 new(zone()) LTrapAllocationMemento(object, temp); | 2367 new(zone()) LTrapAllocationMemento(object, temp); |
2368 return AssignEnvironment(result); | 2368 return AssignEnvironment(result); |
2369 } | 2369 } |
2370 | 2370 |
2371 | 2371 |
| 2372 LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) { |
| 2373 info()->MarkAsDeferredCalling(); |
| 2374 LOperand* context = UseFixed(instr->context(), cp); |
| 2375 LOperand* object = Use(instr->object()); |
| 2376 LOperand* elements = Use(instr->elements()); |
| 2377 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2378 LOperand* current_capacity = UseRegisterOrConstant(instr->current_capacity()); |
| 2379 |
| 2380 LMaybeGrowElements* result = new (zone()) |
| 2381 LMaybeGrowElements(context, object, elements, key, current_capacity); |
| 2382 DefineFixed(result, r0); |
| 2383 return AssignPointerMap(AssignEnvironment(result)); |
| 2384 } |
| 2385 |
| 2386 |
2372 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2387 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2373 bool is_in_object = instr->access().IsInobject(); | 2388 bool is_in_object = instr->access().IsInobject(); |
2374 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2389 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2375 bool needs_write_barrier_for_map = instr->has_transition() && | 2390 bool needs_write_barrier_for_map = instr->has_transition() && |
2376 instr->NeedsWriteBarrierForMap(); | 2391 instr->NeedsWriteBarrierForMap(); |
2377 | 2392 |
2378 LOperand* obj; | 2393 LOperand* obj; |
2379 if (needs_write_barrier) { | 2394 if (needs_write_barrier) { |
2380 obj = is_in_object | 2395 obj = is_in_object |
2381 ? UseRegister(instr->object()) | 2396 ? UseRegister(instr->object()) |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2680 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
2666 HAllocateBlockContext* instr) { | 2681 HAllocateBlockContext* instr) { |
2667 LOperand* context = UseFixed(instr->context(), cp); | 2682 LOperand* context = UseFixed(instr->context(), cp); |
2668 LOperand* function = UseRegisterAtStart(instr->function()); | 2683 LOperand* function = UseRegisterAtStart(instr->function()); |
2669 LAllocateBlockContext* result = | 2684 LAllocateBlockContext* result = |
2670 new(zone()) LAllocateBlockContext(context, function); | 2685 new(zone()) LAllocateBlockContext(context, function); |
2671 return MarkAsCall(DefineFixed(result, cp), instr); | 2686 return MarkAsCall(DefineFixed(result, cp), instr); |
2672 } | 2687 } |
2673 | 2688 |
2674 } } // namespace v8::internal | 2689 } } // namespace v8::internal |
OLD | NEW |