| 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/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && | 53 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && |
| 54 GenerateJumpTable() && GenerateSafepointTable(); | 54 GenerateJumpTable() && GenerateSafepointTable(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 void LCodeGen::FinishCode(Handle<Code> code) { | 58 void LCodeGen::FinishCode(Handle<Code> code) { |
| 59 DCHECK(is_done()); | 59 DCHECK(is_done()); |
| 60 code->set_stack_slots(GetTotalFrameSlotCount()); | 60 code->set_stack_slots(GetTotalFrameSlotCount()); |
| 61 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 61 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 62 Handle<ByteArray> source_positions = |
| 63 source_position_table_builder_.ToSourcePositionTable(); |
| 64 code->set_source_position_table(*source_positions); |
| 62 PopulateDeoptimizationData(code); | 65 PopulateDeoptimizationData(code); |
| 63 } | 66 } |
| 64 | 67 |
| 65 | 68 |
| 66 void LCodeGen::SaveCallerDoubles() { | 69 void LCodeGen::SaveCallerDoubles() { |
| 67 DCHECK(info()->saves_caller_doubles()); | 70 DCHECK(info()->saves_caller_doubles()); |
| 68 DCHECK(NeedsEagerFrame()); | 71 DCHECK(NeedsEagerFrame()); |
| 69 Comment(";;; Save clobbered callee double registers"); | 72 Comment(";;; Save clobbered callee double registers"); |
| 70 int count = 0; | 73 int count = 0; |
| 71 BitVector* doubles = chunk()->allocated_double_registers(); | 74 BitVector* doubles = chunk()->allocated_double_registers(); |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 | 857 |
| 855 | 858 |
| 856 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 859 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
| 857 int arguments, | 860 int arguments, |
| 858 Safepoint::DeoptMode deopt_mode) { | 861 Safepoint::DeoptMode deopt_mode) { |
| 859 RecordSafepoint( | 862 RecordSafepoint( |
| 860 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 863 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); |
| 861 } | 864 } |
| 862 | 865 |
| 863 | 866 |
| 864 void LCodeGen::RecordAndWritePosition(int position) { | |
| 865 if (position == RelocInfo::kNoPosition) return; | |
| 866 masm()->positions_recorder()->RecordPosition(position); | |
| 867 } | |
| 868 | |
| 869 | |
| 870 static const char* LabelType(LLabel* label) { | 867 static const char* LabelType(LLabel* label) { |
| 871 if (label->is_loop_header()) return " (loop header)"; | 868 if (label->is_loop_header()) return " (loop header)"; |
| 872 if (label->is_osr_entry()) return " (OSR entry)"; | 869 if (label->is_osr_entry()) return " (OSR entry)"; |
| 873 return ""; | 870 return ""; |
| 874 } | 871 } |
| 875 | 872 |
| 876 | 873 |
| 877 void LCodeGen::DoLabel(LLabel* label) { | 874 void LCodeGen::DoLabel(LLabel* label) { |
| 878 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 875 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
| 879 current_instruction_, | 876 current_instruction_, |
| (...skipping 4868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5748 __ ld(result, FieldMemOperand(scratch, | 5745 __ ld(result, FieldMemOperand(scratch, |
| 5749 FixedArray::kHeaderSize - kPointerSize)); | 5746 FixedArray::kHeaderSize - kPointerSize)); |
| 5750 __ bind(deferred->exit()); | 5747 __ bind(deferred->exit()); |
| 5751 __ bind(&done); | 5748 __ bind(&done); |
| 5752 } | 5749 } |
| 5753 | 5750 |
| 5754 #undef __ | 5751 #undef __ |
| 5755 | 5752 |
| 5756 } // namespace internal | 5753 } // namespace internal |
| 5757 } // namespace v8 | 5754 } // namespace v8 |
| OLD | NEW |