| 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/crankshaft/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 | 10 |
| (...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2399 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2399 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
| 2400 LOperand* char_code = UseRegister(instr->value()); | 2400 LOperand* char_code = UseRegister(instr->value()); |
| 2401 LOperand* context = UseAny(instr->context()); | 2401 LOperand* context = UseAny(instr->context()); |
| 2402 LStringCharFromCode* result = | 2402 LStringCharFromCode* result = |
| 2403 new(zone()) LStringCharFromCode(context, char_code); | 2403 new(zone()) LStringCharFromCode(context, char_code); |
| 2404 return AssignPointerMap(DefineAsRegister(result)); | 2404 return AssignPointerMap(DefineAsRegister(result)); |
| 2405 } | 2405 } |
| 2406 | 2406 |
| 2407 | 2407 |
| 2408 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2408 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
| 2409 info()->MarkAsDeferredCalling(); | 2409 LOperand* size = instr->size()->IsConstant() ? UseConstant(instr->size()) |
| 2410 LOperand* context = UseAny(instr->context()); | 2410 : UseRegister(instr->size()); |
| 2411 LOperand* size = instr->size()->IsConstant() | 2411 if (instr->IsAllocationFolded()) { |
| 2412 ? UseConstant(instr->size()) | 2412 LOperand* temp = TempRegister(); |
| 2413 : UseTempRegister(instr->size()); | 2413 LFastAllocate* result = new (zone()) LFastAllocate(size, temp); |
| 2414 LOperand* temp = TempRegister(); | 2414 return DefineAsRegister(result); |
| 2415 LAllocate* result = new(zone()) LAllocate(context, size, temp); | 2415 } else { |
| 2416 return AssignPointerMap(DefineAsRegister(result)); | 2416 info()->MarkAsDeferredCalling(); |
| 2417 LOperand* context = UseAny(instr->context()); |
| 2418 LOperand* temp = TempRegister(); |
| 2419 LAllocate* result = new (zone()) LAllocate(context, size, temp); |
| 2420 return AssignPointerMap(DefineAsRegister(result)); |
| 2421 } |
| 2417 } | 2422 } |
| 2418 | 2423 |
| 2419 | 2424 |
| 2420 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { | 2425 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
| 2421 DCHECK(argument_count_ == 0); | 2426 DCHECK(argument_count_ == 0); |
| 2422 allocator_->MarkAsOsrEntry(); | 2427 allocator_->MarkAsOsrEntry(); |
| 2423 current_block_->last_environment()->set_ast_id(instr->ast_id()); | 2428 current_block_->last_environment()->set_ast_id(instr->ast_id()); |
| 2424 return AssignEnvironment(new(zone()) LOsrEntry); | 2429 return AssignEnvironment(new(zone()) LOsrEntry); |
| 2425 } | 2430 } |
| 2426 | 2431 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2589 LOperand* index = UseTempRegister(instr->index()); | 2594 LOperand* index = UseTempRegister(instr->index()); |
| 2590 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2595 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2591 LInstruction* result = DefineSameAsFirst(load); | 2596 LInstruction* result = DefineSameAsFirst(load); |
| 2592 return AssignPointerMap(result); | 2597 return AssignPointerMap(result); |
| 2593 } | 2598 } |
| 2594 | 2599 |
| 2595 } // namespace internal | 2600 } // namespace internal |
| 2596 } // namespace v8 | 2601 } // namespace v8 |
| 2597 | 2602 |
| 2598 #endif // V8_TARGET_ARCH_IA32 | 2603 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |