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

Side by Side Diff: runtime/vm/il_printer.cc

Issue 999213002: Add a bit of info to flow graph printout (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/il_printer.h" 5 #include "vm/il_printer.h"
6 6
7 #include "vm/flow_graph_range_analysis.h" 7 #include "vm/flow_graph_range_analysis.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void StaticCallInstr::PrintOperandsTo(BufferFormatter* f) const { 478 void StaticCallInstr::PrintOperandsTo(BufferFormatter* f) const {
479 f->Print(" %s ", String::Handle(function().name()).ToCString()); 479 f->Print(" %s ", String::Handle(function().name()).ToCString());
480 for (intptr_t i = 0; i < ArgumentCount(); ++i) { 480 for (intptr_t i = 0; i < ArgumentCount(); ++i) {
481 if (i > 0) f->Print(", "); 481 if (i > 0) f->Print(", ");
482 PushArgumentAt(i)->value()->PrintTo(f); 482 PushArgumentAt(i)->value()->PrintTo(f);
483 } 483 }
484 } 484 }
485 485
486 486
487 void LoadLocalInstr::PrintOperandsTo(BufferFormatter* f) const { 487 void LoadLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
488 f->Print("%s", local().name().ToCString()); 488 f->Print("%s @%d", local().name().ToCString(), local().index());
489 } 489 }
490 490
491 491
492 void StoreLocalInstr::PrintOperandsTo(BufferFormatter* f) const { 492 void StoreLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
493 f->Print("%s, ", local().name().ToCString()); 493 f->Print("%s @%d, ", local().name().ToCString(), local().index());
494 value()->PrintTo(f); 494 value()->PrintTo(f);
495 } 495 }
496 496
497 497
498 void NativeCallInstr::PrintOperandsTo(BufferFormatter* f) const { 498 void NativeCallInstr::PrintOperandsTo(BufferFormatter* f) const {
499 f->Print("%s", native_name().ToCString()); 499 f->Print("%s", native_name().ToCString());
500 } 500 }
501 501
502 502
503 void GuardFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 503 void GuardFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 value()->PrintTo(f); 1139 value()->PrintTo(f);
1140 } 1140 }
1141 1141
1142 1142
1143 void GotoInstr::PrintTo(BufferFormatter* f) const { 1143 void GotoInstr::PrintTo(BufferFormatter* f) const {
1144 if (HasParallelMove()) { 1144 if (HasParallelMove()) {
1145 parallel_move()->PrintTo(f); 1145 parallel_move()->PrintTo(f);
1146 f->Print(" "); 1146 f->Print(" ");
1147 } 1147 }
1148 if (GetDeoptId() != Isolate::kNoDeoptId) { 1148 if (GetDeoptId() != Isolate::kNoDeoptId) {
1149 f->Print("goto:%" Pd " %" Pd "", GetDeoptId(), successor()->block_id()); 1149 f->Print("goto:%" Pd " B%" Pd "", GetDeoptId(), successor()->block_id());
1150 } else { 1150 } else {
1151 f->Print("goto: %" Pd "", successor()->block_id()); 1151 f->Print("goto: B%" Pd "", successor()->block_id());
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 1155
1156 void IndirectGotoInstr::PrintTo(BufferFormatter* f) const { 1156 void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
1157 if (GetDeoptId() != Isolate::kNoDeoptId) { 1157 if (GetDeoptId() != Isolate::kNoDeoptId) {
1158 f->Print("igoto:%" Pd "(", GetDeoptId()); 1158 f->Print("igoto:%" Pd "(", GetDeoptId());
1159 } else { 1159 } else {
1160 f->Print("igoto:("); 1160 f->Print("igoto:(");
1161 } 1161 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 } 1207 }
1208 1208
1209 const char* Environment::ToCString() const { 1209 const char* Environment::ToCString() const {
1210 char buffer[1024]; 1210 char buffer[1024];
1211 BufferFormatter bf(buffer, 1024); 1211 BufferFormatter bf(buffer, 1024);
1212 PrintTo(&bf); 1212 PrintTo(&bf);
1213 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); 1213 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer);
1214 } 1214 }
1215 1215
1216 } // namespace dart 1216 } // namespace dart
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