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/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 int argc, | 438 int argc, |
439 LInstruction* instr, | 439 LInstruction* instr, |
440 LOperand* context) { | 440 LOperand* context) { |
441 LoadContextFromDeferred(context); | 441 LoadContextFromDeferred(context); |
442 __ CallRuntimeSaveDoubles(id); | 442 __ CallRuntimeSaveDoubles(id); |
443 RecordSafepointWithRegisters( | 443 RecordSafepointWithRegisters( |
444 instr->pointer_map(), argc, Safepoint::kNoLazyDeopt); | 444 instr->pointer_map(), argc, Safepoint::kNoLazyDeopt); |
445 } | 445 } |
446 | 446 |
447 | 447 |
448 void LCodeGen::RecordAndWritePosition(int position) { | |
449 if (position == RelocInfo::kNoPosition) return; | |
450 masm()->positions_recorder()->RecordPosition(position); | |
451 } | |
452 | |
453 | |
454 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, | 448 void LCodeGen::RecordSafepointWithLazyDeopt(LInstruction* instr, |
455 SafepointMode safepoint_mode) { | 449 SafepointMode safepoint_mode) { |
456 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { | 450 if (safepoint_mode == RECORD_SIMPLE_SAFEPOINT) { |
457 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); | 451 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); |
458 } else { | 452 } else { |
459 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 453 DCHECK(safepoint_mode == RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
460 RecordSafepointWithRegisters( | 454 RecordSafepointWithRegisters( |
461 instr->pointer_map(), 0, Safepoint::kLazyDeopt); | 455 instr->pointer_map(), 0, Safepoint::kLazyDeopt); |
462 } | 456 } |
463 } | 457 } |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 masm()->CheckVeneerPool(true, true); | 811 masm()->CheckVeneerPool(true, true); |
818 safepoints_.Emit(masm(), GetTotalFrameSlotCount()); | 812 safepoints_.Emit(masm(), GetTotalFrameSlotCount()); |
819 return !is_aborted(); | 813 return !is_aborted(); |
820 } | 814 } |
821 | 815 |
822 | 816 |
823 void LCodeGen::FinishCode(Handle<Code> code) { | 817 void LCodeGen::FinishCode(Handle<Code> code) { |
824 DCHECK(is_done()); | 818 DCHECK(is_done()); |
825 code->set_stack_slots(GetTotalFrameSlotCount()); | 819 code->set_stack_slots(GetTotalFrameSlotCount()); |
826 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 820 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 821 Handle<ByteArray> source_positions = |
| 822 source_position_table_builder_.ToSourcePositionTable(); |
| 823 code->set_source_position_table(*source_positions); |
827 PopulateDeoptimizationData(code); | 824 PopulateDeoptimizationData(code); |
828 } | 825 } |
829 | 826 |
830 | 827 |
831 void LCodeGen::DeoptimizeBranch( | 828 void LCodeGen::DeoptimizeBranch( |
832 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason, | 829 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason, |
833 BranchType branch_type, Register reg, int bit, | 830 BranchType branch_type, Register reg, int bit, |
834 Deoptimizer::BailoutType* override_bailout_type) { | 831 Deoptimizer::BailoutType* override_bailout_type) { |
835 LEnvironment* environment = instr->environment(); | 832 LEnvironment* environment = instr->environment(); |
836 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 833 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
(...skipping 4895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5732 // Index is equal to negated out of object property index plus 1. | 5729 // Index is equal to negated out of object property index plus 1. |
5733 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5730 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5734 __ Ldr(result, FieldMemOperand(result, | 5731 __ Ldr(result, FieldMemOperand(result, |
5735 FixedArray::kHeaderSize - kPointerSize)); | 5732 FixedArray::kHeaderSize - kPointerSize)); |
5736 __ Bind(deferred->exit()); | 5733 __ Bind(deferred->exit()); |
5737 __ Bind(&done); | 5734 __ Bind(&done); |
5738 } | 5735 } |
5739 | 5736 |
5740 } // namespace internal | 5737 } // namespace internal |
5741 } // namespace v8 | 5738 } // namespace v8 |
OLD | NEW |