Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 00087e4041a117818ef8f5924158d40e6d02a34c..fdd43cc3806ee39d55b8f03c311d41e6d18ec0ae 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -682,6 +682,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); |
@@ -738,8 +751,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()); |
} |
} |
@@ -776,8 +788,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()); |
} |
} |
@@ -1649,7 +1660,7 @@ Range* HConstant::InferRange(Zone* zone) { |
} |
-int HPhi::position() const { |
+HSourcePosition HPhi::position() const { |
return block()->first()->position(); |
} |