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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1139
1140 1140
1141 void HPhi::AddIndirectUsesTo(int* dest) { 1141 void HPhi::AddIndirectUsesTo(int* dest) {
1142 for (int i = 0; i < Representation::kNumRepresentations; i++) { 1142 for (int i = 0; i < Representation::kNumRepresentations; i++) {
1143 dest[i] += indirect_uses_[i]; 1143 dest[i] += indirect_uses_[i];
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 1147
1148 void HSimulate::PrintDataTo(StringStream* stream) { 1148 void HSimulate::PrintDataTo(StringStream* stream) {
1149 stream->Add("id=%d ", ast_id()); 1149 stream->Add("id=%d", ast_id());
1150 if (pop_count_ > 0) stream->Add("pop %d", pop_count_); 1150 if (pop_count_ > 0) stream->Add(" pop %d", pop_count_);
1151 if (values_.length() > 0) { 1151 if (values_.length() > 0) {
1152 if (pop_count_ > 0) stream->Add(" /"); 1152 if (pop_count_ > 0) stream->Add(" /");
1153 for (int i = 0; i < values_.length(); ++i) { 1153 for (int i = 0; i < values_.length(); ++i) {
1154 if (!HasAssignedIndexAt(i)) { 1154 if (i > 0) stream->Add(",");
1155 if (HasAssignedIndexAt(i)) {
1156 stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
1157 } else {
1155 stream->Add(" push "); 1158 stream->Add(" push ");
1156 } else {
1157 stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
1158 } 1159 }
1159 values_[i]->PrintNameTo(stream); 1160 values_[i]->PrintNameTo(stream);
1160 } 1161 }
1161 } 1162 }
1162 } 1163 }
1163 1164
1164 1165
1165 void HDeoptimize::PrintDataTo(StringStream* stream) { 1166 void HDeoptimize::PrintDataTo(StringStream* stream) {
1166 if (OperandCount() == 0) return; 1167 if (OperandCount() == 0) return;
1167 OperandAt(0)->PrintNameTo(stream); 1168 OperandAt(0)->PrintNameTo(stream);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 } 1450 }
1450 } 1451 }
1451 if (!found) return false; 1452 if (!found) return false;
1452 } 1453 }
1453 return true; 1454 return true;
1454 } 1455 }
1455 1456
1456 1457
1457 void HLoadNamedFieldPolymorphic::PrintDataTo(StringStream* stream) { 1458 void HLoadNamedFieldPolymorphic::PrintDataTo(StringStream* stream) {
1458 object()->PrintNameTo(stream); 1459 object()->PrintNameTo(stream);
1459 stream->Add(" ."); 1460 stream->Add(".");
1460 stream->Add(*String::cast(*name())->ToCString()); 1461 stream->Add(*String::cast(*name())->ToCString());
1461 } 1462 }
1462 1463
1463 1464
1464 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { 1465 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) {
1465 object()->PrintNameTo(stream); 1466 object()->PrintNameTo(stream);
1466 stream->Add(" ."); 1467 stream->Add(".");
1467 stream->Add(*String::cast(*name())->ToCString()); 1468 stream->Add(*String::cast(*name())->ToCString());
1468 } 1469 }
1469 1470
1470 1471
1471 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) { 1472 void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) {
1472 object()->PrintNameTo(stream); 1473 object()->PrintNameTo(stream);
1473 stream->Add("["); 1474 stream->Add("[");
1474 key()->PrintNameTo(stream); 1475 key()->PrintNameTo(stream);
1475 stream->Add("]"); 1476 stream->Add("]");
1476 } 1477 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 ASSERT(name()->IsString()); 1554 ASSERT(name()->IsString());
1554 stream->Add(*String::cast(*name())->ToCString()); 1555 stream->Add(*String::cast(*name())->ToCString());
1555 stream->Add(" = "); 1556 stream->Add(" = ");
1556 value()->PrintNameTo(stream); 1557 value()->PrintNameTo(stream);
1557 } 1558 }
1558 1559
1559 1560
1560 void HStoreNamedField::PrintDataTo(StringStream* stream) { 1561 void HStoreNamedField::PrintDataTo(StringStream* stream) {
1561 object()->PrintNameTo(stream); 1562 object()->PrintNameTo(stream);
1562 stream->Add("."); 1563 stream->Add(".");
1563 ASSERT(name()->IsString());
1564 stream->Add(*String::cast(*name())->ToCString()); 1564 stream->Add(*String::cast(*name())->ToCString());
1565 stream->Add(" = "); 1565 stream->Add(" = ");
1566 value()->PrintNameTo(stream); 1566 value()->PrintNameTo(stream);
1567 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : "");
1567 if (!transition().is_null()) { 1568 if (!transition().is_null()) {
1568 stream->Add(" (transition map %p)", *transition()); 1569 stream->Add(" (transition map %p)", *transition());
1569 } 1570 }
1570 } 1571 }
1571 1572
1572 1573
1573 void HStoreKeyedFastElement::PrintDataTo(StringStream* stream) { 1574 void HStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
1574 object()->PrintNameTo(stream); 1575 object()->PrintNameTo(stream);
1575 stream->Add("["); 1576 stream->Add("[");
1576 key()->PrintNameTo(stream); 1577 key()->PrintNameTo(stream);
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 1984
1984 1985
1985 void HCheckPrototypeMaps::Verify() { 1986 void HCheckPrototypeMaps::Verify() {
1986 HInstruction::Verify(); 1987 HInstruction::Verify();
1987 ASSERT(HasNoUses()); 1988 ASSERT(HasNoUses());
1988 } 1989 }
1989 1990
1990 #endif 1991 #endif
1991 1992
1992 } } // namespace v8::internal 1993 } } // namespace v8::internal
OLDNEW
« 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