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

Unified Diff: src/hydrogen-instructions.cc

Issue 8352044: Improved printing of Simulate, LoadNamedFieldPolymorphic, LoadNamedGeneric, and StoreNamedField H... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
===================================================================
--- src/hydrogen-instructions.cc (revision 9724)
+++ src/hydrogen-instructions.cc (working copy)
@@ -1146,15 +1146,16 @@
void HSimulate::PrintDataTo(StringStream* stream) {
- stream->Add("id=%d ", ast_id());
- if (pop_count_ > 0) stream->Add("pop %d", pop_count_);
+ stream->Add("id=%d", ast_id());
+ if (pop_count_ > 0) stream->Add(" pop %d", pop_count_);
if (values_.length() > 0) {
if (pop_count_ > 0) stream->Add(" /");
for (int i = 0; i < values_.length(); ++i) {
- if (!HasAssignedIndexAt(i)) {
+ if (i > 0) stream->Add(",");
+ if (HasAssignedIndexAt(i)) {
+ stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
+ } else {
stream->Add(" push ");
- } else {
- stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
}
values_[i]->PrintNameTo(stream);
}
@@ -1456,14 +1457,14 @@
void HLoadNamedFieldPolymorphic::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream);
- stream->Add(" .");
+ stream->Add(".");
stream->Add(*String::cast(*name())->ToCString());
}
void HLoadNamedGeneric::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream);
- stream->Add(" .");
+ stream->Add(".");
stream->Add(*String::cast(*name())->ToCString());
}
@@ -1560,10 +1561,10 @@
void HStoreNamedField::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream);
stream->Add(".");
- ASSERT(name()->IsString());
stream->Add(*String::cast(*name())->ToCString());
stream->Add(" = ");
value()->PrintNameTo(stream);
+ stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : "");
if (!transition().is_null()) {
stream->Add(" (transition map %p)", *transition());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698