OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/lithium-inl.h" | 9 #include "src/lithium-inl.h" |
10 | 10 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 case Token::SHL: return "shl-t"; | 347 case Token::SHL: return "shl-t"; |
348 case Token::SAR: return "sar-t"; | 348 case Token::SAR: return "sar-t"; |
349 case Token::SHR: return "shr-t"; | 349 case Token::SHR: return "shr-t"; |
350 default: | 350 default: |
351 UNREACHABLE(); | 351 UNREACHABLE(); |
352 return NULL; | 352 return NULL; |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
356 | 356 |
357 void LChunkBuilder::Abort(BailoutReason reason) { | |
358 info()->set_bailout_reason(reason); | |
359 status_ = ABORTED; | |
360 } | |
361 | |
362 | |
363 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 357 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
364 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 358 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
365 Register::ToAllocationIndex(reg)); | 359 Register::ToAllocationIndex(reg)); |
366 } | 360 } |
367 | 361 |
368 | 362 |
369 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { | 363 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { |
370 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 364 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
371 DoubleRegister::ToAllocationIndex(reg)); | 365 DoubleRegister::ToAllocationIndex(reg)); |
372 } | 366 } |
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2682 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2676 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
2683 // Use an index that corresponds to the location in the unoptimized frame, | 2677 // Use an index that corresponds to the location in the unoptimized frame, |
2684 // which the optimized frame will subsume. | 2678 // which the optimized frame will subsume. |
2685 int env_index = instr->index(); | 2679 int env_index = instr->index(); |
2686 int spill_index = 0; | 2680 int spill_index = 0; |
2687 if (instr->environment()->is_parameter_index(env_index)) { | 2681 if (instr->environment()->is_parameter_index(env_index)) { |
2688 spill_index = chunk_->GetParameterStackSlot(env_index); | 2682 spill_index = chunk_->GetParameterStackSlot(env_index); |
2689 } else { | 2683 } else { |
2690 spill_index = env_index - instr->environment()->first_local_index(); | 2684 spill_index = env_index - instr->environment()->first_local_index(); |
2691 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { | 2685 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
2692 Abort(kTooManySpillSlotsNeededForOSR); | 2686 Retry(kTooManySpillSlotsNeededForOSR); |
2693 spill_index = 0; | 2687 spill_index = 0; |
2694 } | 2688 } |
2695 } | 2689 } |
2696 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); | 2690 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); |
2697 } | 2691 } |
2698 | 2692 |
2699 | 2693 |
2700 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { | 2694 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { |
2701 return NULL; | 2695 return NULL; |
2702 } | 2696 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2753 HAllocateBlockContext* instr) { | 2747 HAllocateBlockContext* instr) { |
2754 LOperand* context = UseFixed(instr->context(), cp); | 2748 LOperand* context = UseFixed(instr->context(), cp); |
2755 LOperand* function = UseRegisterAtStart(instr->function()); | 2749 LOperand* function = UseRegisterAtStart(instr->function()); |
2756 LAllocateBlockContext* result = | 2750 LAllocateBlockContext* result = |
2757 new(zone()) LAllocateBlockContext(context, function); | 2751 new(zone()) LAllocateBlockContext(context, function); |
2758 return MarkAsCall(DefineFixed(result, cp), instr); | 2752 return MarkAsCall(DefineFixed(result, cp), instr); |
2759 } | 2753 } |
2760 | 2754 |
2761 | 2755 |
2762 } } // namespace v8::internal | 2756 } } // namespace v8::internal |
OLD | NEW |