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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 HBasicBlock* next = NULL; | 423 HBasicBlock* next = NULL; |
424 if (i < blocks->length() - 1) next = blocks->at(i + 1); | 424 if (i < blocks->length() - 1) next = blocks->at(i + 1); |
425 DoBasicBlock(blocks->at(i), next); | 425 DoBasicBlock(blocks->at(i), next); |
426 if (is_aborted()) return NULL; | 426 if (is_aborted()) return NULL; |
427 } | 427 } |
428 status_ = DONE; | 428 status_ = DONE; |
429 return chunk_; | 429 return chunk_; |
430 } | 430 } |
431 | 431 |
432 | 432 |
433 void LChunkBuilder::Abort(BailoutReason reason) { | |
434 info()->set_bailout_reason(reason); | |
435 status_ = ABORTED; | |
436 } | |
437 | |
438 | |
439 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 433 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
440 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 434 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
441 Register::ToAllocationIndex(reg)); | 435 Register::ToAllocationIndex(reg)); |
442 } | 436 } |
443 | 437 |
444 | 438 |
445 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { | 439 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { |
446 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 440 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
447 DoubleRegister::ToAllocationIndex(reg)); | 441 DoubleRegister::ToAllocationIndex(reg)); |
448 } | 442 } |
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2412 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
2419 // Use an index that corresponds to the location in the unoptimized frame, | 2413 // Use an index that corresponds to the location in the unoptimized frame, |
2420 // which the optimized frame will subsume. | 2414 // which the optimized frame will subsume. |
2421 int env_index = instr->index(); | 2415 int env_index = instr->index(); |
2422 int spill_index = 0; | 2416 int spill_index = 0; |
2423 if (instr->environment()->is_parameter_index(env_index)) { | 2417 if (instr->environment()->is_parameter_index(env_index)) { |
2424 spill_index = chunk()->GetParameterStackSlot(env_index); | 2418 spill_index = chunk()->GetParameterStackSlot(env_index); |
2425 } else { | 2419 } else { |
2426 spill_index = env_index - instr->environment()->first_local_index(); | 2420 spill_index = env_index - instr->environment()->first_local_index(); |
2427 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2421 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
2428 Abort(kTooManySpillSlotsNeededForOSR); | 2422 Retry(kTooManySpillSlotsNeededForOSR); |
2429 spill_index = 0; | 2423 spill_index = 0; |
2430 } | 2424 } |
2431 } | 2425 } |
2432 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 2426 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); |
2433 } | 2427 } |
2434 | 2428 |
2435 | 2429 |
2436 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { | 2430 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { |
2437 LOperand* context = UseFixed(instr->context(), cp); | 2431 LOperand* context = UseFixed(instr->context(), cp); |
2438 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); | 2432 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), v0), instr); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2591 LOperand* function = UseRegisterAtStart(instr->function()); | 2585 LOperand* function = UseRegisterAtStart(instr->function()); |
2592 LAllocateBlockContext* result = | 2586 LAllocateBlockContext* result = |
2593 new(zone()) LAllocateBlockContext(context, function); | 2587 new(zone()) LAllocateBlockContext(context, function); |
2594 return MarkAsCall(DefineFixed(result, cp), instr); | 2588 return MarkAsCall(DefineFixed(result, cp), instr); |
2595 } | 2589 } |
2596 | 2590 |
2597 | 2591 |
2598 } } // namespace v8::internal | 2592 } } // namespace v8::internal |
2599 | 2593 |
2600 #endif // V8_TARGET_ARCH_MIPS64 | 2594 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |