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

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

Issue 10830339: Propagate class ids using existing type propagation framework. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
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/intermediate_language.h" 7 #include "vm/intermediate_language.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 #include "vm/parser.h" 9 #include "vm/parser.h"
10 10
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 } 430 }
431 431
432 432
433 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) { 433 static void PrintPropagatedType(BufferFormatter* f, const Definition& def) {
434 if (def.HasPropagatedType()) { 434 if (def.HasPropagatedType()) {
435 String& name = String::Handle(); 435 String& name = String::Handle();
436 name = AbstractType::Handle(def.PropagatedType()).Name(); 436 name = AbstractType::Handle(def.PropagatedType()).Name();
437 f->Print(" {PT: %s}", name.ToCString()); 437 f->Print(" {PT: %s}", name.ToCString());
438 } 438 }
439 if (def.has_propagated_cid()) {
440 const Class& cls = Class::Handle(
441 Isolate::Current()->class_table()->At(def.propagated_cid()));
442 f->Print(" {PCid: %s}", String::Handle(cls.Name()).ToCString());
443 }
439 } 444 }
440 445
446
441 void PhiInstr::PrintTo(BufferFormatter* f) const { 447 void PhiInstr::PrintTo(BufferFormatter* f) const {
442 f->Print(" v%d <- phi(", ssa_temp_index()); 448 f->Print(" v%d <- phi(", ssa_temp_index());
443 for (intptr_t i = 0; i < inputs_.length(); ++i) { 449 for (intptr_t i = 0; i < inputs_.length(); ++i) {
444 if (inputs_[i] != NULL) inputs_[i]->PrintTo(f); 450 if (inputs_[i] != NULL) inputs_[i]->PrintTo(f);
445 if (i < inputs_.length() - 1) f->Print(", "); 451 if (i < inputs_.length() - 1) f->Print(", ");
446 } 452 }
447 f->Print(")"); 453 f->Print(")");
448 PrintPropagatedType(f, *this); 454 PrintPropagatedType(f, *this);
449 } 455 }
450 456
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { 807 if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
802 f->Print(" ["); 808 f->Print(" [");
803 locations_[i].PrintTo(f); 809 locations_[i].PrintTo(f);
804 f->Print("]"); 810 f->Print("]");
805 } 811 }
806 } 812 }
807 f->Print(" }"); 813 f->Print(" }");
808 } 814 }
809 815
810 } // namespace dart 816 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698