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 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 LInstruction* LChunkBuilder::DoTrapAllocationMemento( | 2368 LInstruction* LChunkBuilder::DoTrapAllocationMemento( |
2369 HTrapAllocationMemento* instr) { | 2369 HTrapAllocationMemento* instr) { |
2370 LOperand* object = UseRegister(instr->object()); | 2370 LOperand* object = UseRegister(instr->object()); |
2371 LOperand* temp = TempRegister(); | 2371 LOperand* temp = TempRegister(); |
2372 LTrapAllocationMemento* result = | 2372 LTrapAllocationMemento* result = |
2373 new(zone()) LTrapAllocationMemento(object, temp); | 2373 new(zone()) LTrapAllocationMemento(object, temp); |
2374 return AssignEnvironment(result); | 2374 return AssignEnvironment(result); |
2375 } | 2375 } |
2376 | 2376 |
2377 | 2377 |
| 2378 LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) { |
| 2379 info()->MarkAsDeferredCalling(); |
| 2380 LOperand* context = UseFixed(instr->context(), rsi); |
| 2381 LOperand* object = Use(instr->object()); |
| 2382 LOperand* elements = Use(instr->elements()); |
| 2383 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2384 LOperand* current_capacity = UseRegisterOrConstant(instr->current_capacity()); |
| 2385 |
| 2386 LMaybeGrowElements* result = new (zone()) |
| 2387 LMaybeGrowElements(context, object, elements, key, current_capacity); |
| 2388 DefineFixed(result, rax); |
| 2389 return AssignPointerMap(AssignEnvironment(result)); |
| 2390 } |
| 2391 |
| 2392 |
2378 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2393 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
2379 bool is_in_object = instr->access().IsInobject(); | 2394 bool is_in_object = instr->access().IsInobject(); |
2380 bool is_external_location = instr->access().IsExternalMemory() && | 2395 bool is_external_location = instr->access().IsExternalMemory() && |
2381 instr->access().offset() == 0; | 2396 instr->access().offset() == 0; |
2382 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2397 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2383 bool needs_write_barrier_for_map = instr->has_transition() && | 2398 bool needs_write_barrier_for_map = instr->has_transition() && |
2384 instr->NeedsWriteBarrierForMap(); | 2399 instr->NeedsWriteBarrierForMap(); |
2385 | 2400 |
2386 LOperand* obj; | 2401 LOperand* obj; |
2387 if (needs_write_barrier) { | 2402 if (needs_write_barrier) { |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2702 LOperand* function = UseRegisterAtStart(instr->function()); | 2717 LOperand* function = UseRegisterAtStart(instr->function()); |
2703 LAllocateBlockContext* result = | 2718 LAllocateBlockContext* result = |
2704 new(zone()) LAllocateBlockContext(context, function); | 2719 new(zone()) LAllocateBlockContext(context, function); |
2705 return MarkAsCall(DefineFixed(result, rsi), instr); | 2720 return MarkAsCall(DefineFixed(result, rsi), instr); |
2706 } | 2721 } |
2707 | 2722 |
2708 | 2723 |
2709 } } // namespace v8::internal | 2724 } } // namespace v8::internal |
2710 | 2725 |
2711 #endif // V8_TARGET_ARCH_X64 | 2726 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |