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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PopulateDeoptimizationData(code); | 71 PopulateDeoptimizationData(code); |
| 72 Handle<ByteArray> source_positions = |
| 73 source_position_table_builder_.ToSourcePositionTable(); |
| 74 code->set_source_position_table(*source_positions); |
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; |
81 for (offset -= kPageSize; offset > 0; offset -= kPageSize) { | 84 for (offset -= kPageSize; offset > 0; offset -= kPageSize) { |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 } | 803 } |
801 | 804 |
802 | 805 |
803 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 806 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
804 int arguments, | 807 int arguments, |
805 Safepoint::DeoptMode mode) { | 808 Safepoint::DeoptMode mode) { |
806 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, mode); | 809 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, mode); |
807 } | 810 } |
808 | 811 |
809 | 812 |
810 void LCodeGen::RecordAndWritePosition(int position) { | |
811 if (position == RelocInfo::kNoPosition) return; | |
812 masm()->positions_recorder()->RecordPosition(position); | |
813 } | |
814 | |
815 | |
816 static const char* LabelType(LLabel* label) { | 813 static const char* LabelType(LLabel* label) { |
817 if (label->is_loop_header()) return " (loop header)"; | 814 if (label->is_loop_header()) return " (loop header)"; |
818 if (label->is_osr_entry()) return " (OSR entry)"; | 815 if (label->is_osr_entry()) return " (OSR entry)"; |
819 return ""; | 816 return ""; |
820 } | 817 } |
821 | 818 |
822 | 819 |
823 void LCodeGen::DoLabel(LLabel* label) { | 820 void LCodeGen::DoLabel(LLabel* label) { |
824 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 821 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
825 current_instruction_, | 822 current_instruction_, |
(...skipping 4484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5310 __ bind(deferred->exit()); | 5307 __ bind(deferred->exit()); |
5311 __ bind(&done); | 5308 __ bind(&done); |
5312 } | 5309 } |
5313 | 5310 |
5314 #undef __ | 5311 #undef __ |
5315 | 5312 |
5316 } // namespace internal | 5313 } // namespace internal |
5317 } // namespace v8 | 5314 } // namespace v8 |
5318 | 5315 |
5319 #endif // V8_TARGET_ARCH_IA32 | 5316 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |