Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 2101523003: Use source position table for crankshaft code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepos
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.h ('k') | src/crankshaft/x87/lithium-codegen-x87.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 GenerateDeferredCode() && 59 GenerateDeferredCode() &&
60 GenerateJumpTable() && 60 GenerateJumpTable() &&
61 GenerateSafepointTable(); 61 GenerateSafepointTable();
62 } 62 }
63 63
64 64
65 void LCodeGen::FinishCode(Handle<Code> code) { 65 void LCodeGen::FinishCode(Handle<Code> code) {
66 DCHECK(is_done()); 66 DCHECK(is_done());
67 code->set_stack_slots(GetTotalFrameSlotCount()); 67 code->set_stack_slots(GetTotalFrameSlotCount());
68 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); 68 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
69 Handle<ByteArray> source_positions =
70 source_position_table_builder_.ToSourcePositionTable();
71 code->set_source_position_table(*source_positions);
69 PopulateDeoptimizationData(code); 72 PopulateDeoptimizationData(code);
70 } 73 }
71 74
72 75
73 #ifdef _MSC_VER 76 #ifdef _MSC_VER
74 void LCodeGen::MakeSureStackPagesMapped(int offset) { 77 void LCodeGen::MakeSureStackPagesMapped(int offset) {
75 const int kPageSize = 4 * KB; 78 const int kPageSize = 4 * KB;
76 for (offset -= kPageSize; offset > 0; offset -= kPageSize) { 79 for (offset -= kPageSize; offset > 0; offset -= kPageSize) {
77 __ movp(Operand(rsp, offset), rax); 80 __ movp(Operand(rsp, offset), rax);
78 } 81 }
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 831 }
829 832
830 833
831 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, 834 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers,
832 int arguments, 835 int arguments,
833 Safepoint::DeoptMode deopt_mode) { 836 Safepoint::DeoptMode deopt_mode) {
834 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); 837 RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode);
835 } 838 }
836 839
837 840
838 void LCodeGen::RecordAndWritePosition(int position) {
839 if (position == RelocInfo::kNoPosition) return;
840 masm()->positions_recorder()->RecordPosition(position);
841 }
842
843
844 static const char* LabelType(LLabel* label) { 841 static const char* LabelType(LLabel* label) {
845 if (label->is_loop_header()) return " (loop header)"; 842 if (label->is_loop_header()) return " (loop header)";
846 if (label->is_osr_entry()) return " (OSR entry)"; 843 if (label->is_osr_entry()) return " (OSR entry)";
847 return ""; 844 return "";
848 } 845 }
849 846
850 847
851 void LCodeGen::DoLabel(LLabel* label) { 848 void LCodeGen::DoLabel(LLabel* label) {
852 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", 849 Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------",
853 current_instruction_, 850 current_instruction_,
(...skipping 4734 matching lines...) Expand 10 before | Expand all | Expand 10 after
5588 __ bind(deferred->exit()); 5585 __ bind(deferred->exit());
5589 __ bind(&done); 5586 __ bind(&done);
5590 } 5587 }
5591 5588
5592 #undef __ 5589 #undef __
5593 5590
5594 } // namespace internal 5591 } // namespace internal
5595 } // namespace v8 5592 } // namespace v8
5596 5593
5597 #endif // V8_TARGET_ARCH_X64 5594 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.h ('k') | src/crankshaft/x87/lithium-codegen-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698