Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 28617517163d6e589860dd2ac8030ad48f39e395..a7194d60cbaa8b0e17f2aa6546511b0a252dee44 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -680,6 +680,19 @@ void HValue::ComputeInitialRange(Zone* zone) { |
} |
+void HSourcePosition::PrintTo(FILE* out) { |
+ if (IsUnknown()) { |
+ PrintF(out, "<?>"); |
+ } else { |
+ if (FLAG_hydrogen_track_positions) { |
+ PrintF(out, "<%d:%d>", inlining_id(), position()); |
+ } else { |
+ PrintF(out, "<0:%d>", raw()); |
+ } |
+ } |
+} |
+ |
+ |
void HInstruction::PrintTo(StringStream* stream) { |
PrintMnemonicTo(stream); |
PrintDataTo(stream); |
@@ -733,8 +746,7 @@ void HInstruction::InsertBefore(HInstruction* next) { |
next_ = next; |
previous_ = prev; |
SetBlock(next->block()); |
- if (position() == RelocInfo::kNoPosition && |
- next->position() != RelocInfo::kNoPosition) { |
+ if (!has_position() && next->has_position()) { |
set_position(next->position()); |
} |
} |
@@ -771,8 +783,7 @@ void HInstruction::InsertAfter(HInstruction* previous) { |
if (block->last() == previous) { |
block->set_last(this); |
} |
- if (position() == RelocInfo::kNoPosition && |
- previous->position() != RelocInfo::kNoPosition) { |
+ if (!has_position() && previous->has_position()) { |
set_position(previous->position()); |
} |
} |
@@ -1668,7 +1679,7 @@ Range* HConstant::InferRange(Zone* zone) { |
} |
-int HPhi::position() const { |
+HSourcePosition HPhi::position() const { |
return block()->first()->position(); |
} |