Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 31630d14118a3c617d1b28a801863f5574fc92e8..22eb3a55cb00d498f4970de1d041bfaa746c3810 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -741,6 +741,13 @@ void HInstruction::InsertBefore(HInstruction* next) { |
next_ = next; |
previous_ = prev; |
SetBlock(next->block()); |
+ if (position() == RelocInfo::kNoPosition) { |
+ if (next->position() != RelocInfo::kNoPosition) { |
+ set_position(next->position()); |
+ } else { |
+ ASSERT(next->position() == RelocInfo::kNoPosition); |
Michael Starzinger
2013/10/18 13:04:21
nit: This if cascade looks awfully complex, especi
danno
2013/10/19 17:11:40
Done.
|
+ } |
+ } |
} |
@@ -775,6 +782,13 @@ void HInstruction::InsertAfter(HInstruction* previous) { |
if (block->last() == previous) { |
block->set_last(this); |
} |
+ if (position() == RelocInfo::kNoPosition) { |
+ if (previous->position() != RelocInfo::kNoPosition) { |
+ set_position(previous->position()); |
+ } else { |
+ ASSERT(previous->position() == RelocInfo::kNoPosition); |
Michael Starzinger
2013/10/18 13:04:21
nit: Likewise.
Michael Starzinger
2013/10/18 13:04:21
nit: Likewise.
danno
2013/10/19 17:11:40
Done.
danno
2013/10/19 17:11:40
Done.
|
+ } |
+ } |
} |
@@ -1592,6 +1606,11 @@ Range* HConstant::InferRange(Zone* zone) { |
} |
+int HPhi::position() const { |
+ return block()->first()->position(); |
+} |
+ |
+ |
Range* HPhi::InferRange(Zone* zone) { |
Representation r = representation(); |
if (r.IsSmiOrInteger32()) { |