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

Unified Diff: src/hydrogen-instructions.cc

Issue 24957003: Add tool to visualize machine code/lithium. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final polish before review Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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()) {

Powered by Google App Engine
This is Rietveld 408576698