| 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 "src/crankshaft/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2312 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2312 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
| 2313 LOperand* char_code = UseRegister(instr->value()); | 2313 LOperand* char_code = UseRegister(instr->value()); |
| 2314 LOperand* context = UseAny(instr->context()); | 2314 LOperand* context = UseAny(instr->context()); |
| 2315 LStringCharFromCode* result = | 2315 LStringCharFromCode* result = |
| 2316 new (zone()) LStringCharFromCode(context, char_code); | 2316 new (zone()) LStringCharFromCode(context, char_code); |
| 2317 return AssignPointerMap(DefineAsRegister(result)); | 2317 return AssignPointerMap(DefineAsRegister(result)); |
| 2318 } | 2318 } |
| 2319 | 2319 |
| 2320 | 2320 |
| 2321 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2321 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
| 2322 info()->MarkAsDeferredCalling(); | |
| 2323 LOperand* context = UseAny(instr->context()); | |
| 2324 LOperand* size = UseRegisterOrConstant(instr->size()); | 2322 LOperand* size = UseRegisterOrConstant(instr->size()); |
| 2325 LOperand* temp1 = TempRegister(); | 2323 LOperand* temp1 = TempRegister(); |
| 2326 LOperand* temp2 = TempRegister(); | 2324 LOperand* temp2 = TempRegister(); |
| 2327 LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2); | 2325 if (instr->IsAllocationFolded()) { |
| 2328 return AssignPointerMap(DefineAsRegister(result)); | 2326 LFastAllocate* result = new (zone()) LFastAllocate(size, temp1, temp2); |
| 2327 return DefineAsRegister(result); |
| 2328 } else { |
| 2329 info()->MarkAsDeferredCalling(); |
| 2330 LOperand* context = UseAny(instr->context()); |
| 2331 LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2); |
| 2332 return AssignPointerMap(DefineAsRegister(result)); |
| 2333 } |
| 2329 } | 2334 } |
| 2330 | 2335 |
| 2331 | 2336 |
| 2332 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { | 2337 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
| 2333 DCHECK(argument_count_ == 0); | 2338 DCHECK(argument_count_ == 0); |
| 2334 allocator_->MarkAsOsrEntry(); | 2339 allocator_->MarkAsOsrEntry(); |
| 2335 current_block_->last_environment()->set_ast_id(instr->ast_id()); | 2340 current_block_->last_environment()->set_ast_id(instr->ast_id()); |
| 2336 return AssignEnvironment(new (zone()) LOsrEntry); | 2341 return AssignEnvironment(new (zone()) LOsrEntry); |
| 2337 } | 2342 } |
| 2338 | 2343 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2497 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2493 LOperand* object = UseRegister(instr->object()); | 2498 LOperand* object = UseRegister(instr->object()); |
| 2494 LOperand* index = UseTempRegister(instr->index()); | 2499 LOperand* index = UseTempRegister(instr->index()); |
| 2495 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2500 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
| 2496 LInstruction* result = DefineSameAsFirst(load); | 2501 LInstruction* result = DefineSameAsFirst(load); |
| 2497 return AssignPointerMap(result); | 2502 return AssignPointerMap(result); |
| 2498 } | 2503 } |
| 2499 | 2504 |
| 2500 } // namespace internal | 2505 } // namespace internal |
| 2501 } // namespace v8 | 2506 } // namespace v8 |
| OLD | NEW |