| 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-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 masm()->AbortConstantPoolBuilding(); | 54 masm()->AbortConstantPoolBuilding(); |
| 55 } | 55 } |
| 56 return rc; | 56 return rc; |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 void LCodeGen::FinishCode(Handle<Code> code) { | 60 void LCodeGen::FinishCode(Handle<Code> code) { |
| 61 DCHECK(is_done()); | 61 DCHECK(is_done()); |
| 62 code->set_stack_slots(GetTotalFrameSlotCount()); | 62 code->set_stack_slots(GetTotalFrameSlotCount()); |
| 63 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 63 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 64 Handle<ByteArray> source_positions = |
| 65 source_position_table_builder_.ToSourcePositionTable(); |
| 66 code->set_source_position_table(*source_positions); |
| 64 PopulateDeoptimizationData(code); | 67 PopulateDeoptimizationData(code); |
| 65 } | 68 } |
| 66 | 69 |
| 67 | 70 |
| 68 void LCodeGen::SaveCallerDoubles() { | 71 void LCodeGen::SaveCallerDoubles() { |
| 69 DCHECK(info()->saves_caller_doubles()); | 72 DCHECK(info()->saves_caller_doubles()); |
| 70 DCHECK(NeedsEagerFrame()); | 73 DCHECK(NeedsEagerFrame()); |
| 71 Comment(";;; Save clobbered callee double registers"); | 74 Comment(";;; Save clobbered callee double registers"); |
| 72 int count = 0; | 75 int count = 0; |
| 73 BitVector* doubles = chunk()->allocated_double_registers(); | 76 BitVector* doubles = chunk()->allocated_double_registers(); |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 } | 829 } |
| 827 | 830 |
| 828 | 831 |
| 829 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 832 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
| 830 int arguments, | 833 int arguments, |
| 831 Safepoint::DeoptMode deopt_mode) { | 834 Safepoint::DeoptMode deopt_mode) { |
| 832 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 835 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); |
| 833 } | 836 } |
| 834 | 837 |
| 835 | 838 |
| 836 void LCodeGen::RecordAndWritePosition(int position) { | |
| 837 if (position == RelocInfo::kNoPosition) return; | |
| 838 masm()->positions_recorder()->RecordPosition(position); | |
| 839 } | |
| 840 | |
| 841 | |
| 842 static const char* LabelType(LLabel* label) { | 839 static const char* LabelType(LLabel* label) { |
| 843 if (label->is_loop_header()) return " (loop header)"; | 840 if (label->is_loop_header()) return " (loop header)"; |
| 844 if (label->is_osr_entry()) return " (OSR entry)"; | 841 if (label->is_osr_entry()) return " (OSR entry)"; |
| 845 return ""; | 842 return ""; |
| 846 } | 843 } |
| 847 | 844 |
| 848 | 845 |
| 849 void LCodeGen::DoLabel(LLabel* label) { | 846 void LCodeGen::DoLabel(LLabel* label) { |
| 850 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 847 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
| 851 current_instruction_, label->hydrogen_value()->id(), | 848 current_instruction_, label->hydrogen_value()->id(), |
| (...skipping 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5802 __ LoadP(result, | 5799 __ LoadP(result, |
| 5803 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5800 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5804 __ bind(deferred->exit()); | 5801 __ bind(deferred->exit()); |
| 5805 __ bind(&done); | 5802 __ bind(&done); |
| 5806 } | 5803 } |
| 5807 | 5804 |
| 5808 #undef __ | 5805 #undef __ |
| 5809 | 5806 |
| 5810 } // namespace internal | 5807 } // namespace internal |
| 5811 } // namespace v8 | 5808 } // namespace v8 |
| OLD | NEW |