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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 GenerateDeferredCode() && | 61 GenerateDeferredCode() && |
62 GenerateJumpTable() && | 62 GenerateJumpTable() && |
63 GenerateSafepointTable(); | 63 GenerateSafepointTable(); |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 void LCodeGen::FinishCode(Handle<Code> code) { | 67 void LCodeGen::FinishCode(Handle<Code> code) { |
68 DCHECK(is_done()); | 68 DCHECK(is_done()); |
69 code->set_stack_slots(GetTotalFrameSlotCount()); | 69 code->set_stack_slots(GetTotalFrameSlotCount()); |
70 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 70 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 71 Handle<ByteArray> source_positions = |
| 72 source_position_table_builder_.ToSourcePositionTable(); |
| 73 code->set_source_position_table(*source_positions); |
71 PopulateDeoptimizationData(code); | 74 PopulateDeoptimizationData(code); |
72 if (info()->ShouldEnsureSpaceForLazyDeopt()) { | 75 if (info()->ShouldEnsureSpaceForLazyDeopt()) { |
73 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); | 76 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); |
74 } | 77 } |
75 } | 78 } |
76 | 79 |
77 | 80 |
78 #ifdef _MSC_VER | 81 #ifdef _MSC_VER |
79 void LCodeGen::MakeSureStackPagesMapped(int offset) { | 82 void LCodeGen::MakeSureStackPagesMapped(int offset) { |
80 const int kPageSize = 4 * KB; | 83 const int kPageSize = 4 * KB; |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 } | 1094 } |
1092 | 1095 |
1093 | 1096 |
1094 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 1097 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
1095 int arguments, | 1098 int arguments, |
1096 Safepoint::DeoptMode mode) { | 1099 Safepoint::DeoptMode mode) { |
1097 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, mode); | 1100 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, mode); |
1098 } | 1101 } |
1099 | 1102 |
1100 | 1103 |
1101 void LCodeGen::RecordAndWritePosition(int position) { | |
1102 if (position == RelocInfo::kNoPosition) return; | |
1103 masm()->positions_recorder()->RecordPosition(position); | |
1104 } | |
1105 | |
1106 | |
1107 static const char* LabelType(LLabel* label) { | 1104 static const char* LabelType(LLabel* label) { |
1108 if (label->is_loop_header()) return " (loop header)"; | 1105 if (label->is_loop_header()) return " (loop header)"; |
1109 if (label->is_osr_entry()) return " (OSR entry)"; | 1106 if (label->is_osr_entry()) return " (OSR entry)"; |
1110 return ""; | 1107 return ""; |
1111 } | 1108 } |
1112 | 1109 |
1113 | 1110 |
1114 void LCodeGen::DoLabel(LLabel* label) { | 1111 void LCodeGen::DoLabel(LLabel* label) { |
1115 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 1112 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
1116 current_instruction_, | 1113 current_instruction_, |
(...skipping 4694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5811 __ bind(deferred->exit()); | 5808 __ bind(deferred->exit()); |
5812 __ bind(&done); | 5809 __ bind(&done); |
5813 } | 5810 } |
5814 | 5811 |
5815 #undef __ | 5812 #undef __ |
5816 | 5813 |
5817 } // namespace internal | 5814 } // namespace internal |
5818 } // namespace v8 | 5815 } // namespace v8 |
5819 | 5816 |
5820 #endif // V8_TARGET_ARCH_X87 | 5817 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |