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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && | 54 return GeneratePrologue() && GenerateBody() && GenerateDeferredCode() && |
55 GenerateJumpTable() && GenerateSafepointTable(); | 55 GenerateJumpTable() && GenerateSafepointTable(); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 void LCodeGen::FinishCode(Handle<Code> code) { | 59 void LCodeGen::FinishCode(Handle<Code> code) { |
60 DCHECK(is_done()); | 60 DCHECK(is_done()); |
61 code->set_stack_slots(GetTotalFrameSlotCount()); | 61 code->set_stack_slots(GetTotalFrameSlotCount()); |
62 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 62 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 63 Handle<ByteArray> source_positions = |
| 64 source_position_table_builder_.ToSourcePositionTable(); |
| 65 code->set_source_position_table(*source_positions); |
63 PopulateDeoptimizationData(code); | 66 PopulateDeoptimizationData(code); |
64 } | 67 } |
65 | 68 |
66 | 69 |
67 void LCodeGen::SaveCallerDoubles() { | 70 void LCodeGen::SaveCallerDoubles() { |
68 DCHECK(info()->saves_caller_doubles()); | 71 DCHECK(info()->saves_caller_doubles()); |
69 DCHECK(NeedsEagerFrame()); | 72 DCHECK(NeedsEagerFrame()); |
70 Comment(";;; Save clobbered callee double registers"); | 73 Comment(";;; Save clobbered callee double registers"); |
71 int count = 0; | 74 int count = 0; |
72 BitVector* doubles = chunk()->allocated_double_registers(); | 75 BitVector* doubles = chunk()->allocated_double_registers(); |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 | 902 |
900 | 903 |
901 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 904 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
902 int arguments, | 905 int arguments, |
903 Safepoint::DeoptMode deopt_mode) { | 906 Safepoint::DeoptMode deopt_mode) { |
904 RecordSafepoint( | 907 RecordSafepoint( |
905 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 908 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); |
906 } | 909 } |
907 | 910 |
908 | 911 |
909 void LCodeGen::RecordAndWritePosition(int position) { | |
910 if (position == RelocInfo::kNoPosition) return; | |
911 masm()->positions_recorder()->RecordPosition(position); | |
912 } | |
913 | |
914 | |
915 static const char* LabelType(LLabel* label) { | 912 static const char* LabelType(LLabel* label) { |
916 if (label->is_loop_header()) return " (loop header)"; | 913 if (label->is_loop_header()) return " (loop header)"; |
917 if (label->is_osr_entry()) return " (OSR entry)"; | 914 if (label->is_osr_entry()) return " (OSR entry)"; |
918 return ""; | 915 return ""; |
919 } | 916 } |
920 | 917 |
921 | 918 |
922 void LCodeGen::DoLabel(LLabel* label) { | 919 void LCodeGen::DoLabel(LLabel* label) { |
923 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 920 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", |
924 current_instruction_, | 921 current_instruction_, |
(...skipping 4621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5546 __ ldr(result, FieldMemOperand(scratch, | 5543 __ ldr(result, FieldMemOperand(scratch, |
5547 FixedArray::kHeaderSize - kPointerSize)); | 5544 FixedArray::kHeaderSize - kPointerSize)); |
5548 __ bind(deferred->exit()); | 5545 __ bind(deferred->exit()); |
5549 __ bind(&done); | 5546 __ bind(&done); |
5550 } | 5547 } |
5551 | 5548 |
5552 #undef __ | 5549 #undef __ |
5553 | 5550 |
5554 } // namespace internal | 5551 } // namespace internal |
5555 } // namespace v8 | 5552 } // namespace v8 |
OLD | NEW |