Index: src/x64/lithium-codegen-x64.cc |
=================================================================== |
--- src/x64/lithium-codegen-x64.cc (revision 16036) |
+++ src/x64/lithium-codegen-x64.cc (working copy) |
@@ -260,6 +260,7 @@ |
bool LCodeGen::GenerateBody() { |
ASSERT(is_generating()); |
bool emit_instructions = true; |
+ |
danno
2013/08/05 16:59:17
Please remove extraneous whitespace change
|
for (current_instruction_ = 0; |
!is_aborted() && current_instruction_ < instructions_->length(); |
current_instruction_++) { |
@@ -278,6 +279,8 @@ |
instr->Mnemonic()); |
} |
+ RecordAndUpdatePosition(instr->position()); |
+ |
instr->CompileToNative(this); |
} |
EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
@@ -331,6 +334,10 @@ |
if (deferred_.length() > 0) { |
for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
LDeferredCode* code = deferred_[i]; |
+ |
+ int pos = instructions_->at(code->instruction_index())->position(); |
+ RecordAndUpdatePosition(pos); |
+ |
Comment(";;; <@%d,#%d> " |
"-------------------- Deferred %s --------------------", |
code->instruction_index(), |
@@ -859,6 +866,14 @@ |
} |
+void LCodeGen::RecordAndUpdatePosition(int position) { |
+ if (position >= 0 && position != old_position_) { |
+ masm()->positions_recorder()->RecordPosition(position); |
+ old_position_ = position; |
+ } |
+} |
+ |
+ |
static const char* LabelType(LLabel* label) { |
if (label->is_loop_header()) return " (loop header)"; |
if (label->is_osr_entry()) return " (OSR entry)"; |