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

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

Issue 10896011: Fix crash with --code-comments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const Class& cls = 124 const Class& cls =
125 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k])); 125 Class::Handle(Isolate::Current()->class_table()->At(class_ids[k]));
126 f->Print("%s", String::Handle(cls.Name()).ToCString()); 126 f->Print("%s", String::Handle(cls.Name()).ToCString());
127 } 127 }
128 } 128 }
129 f->Print("]"); 129 f->Print("]");
130 } 130 }
131 131
132 132
133 void Computation::PrintTo(BufferFormatter* f) const { 133 void Computation::PrintTo(BufferFormatter* f) const {
134 f->Print("%s:%d(", DebugName(), deopt_id()); 134 // Do not access 'deopt_id()' as it asserts that the computation can
135 // deoptimize.
136 f->Print("%s:%d(", DebugName(), deopt_id_);
135 PrintOperandsTo(f); 137 PrintOperandsTo(f);
136 f->Print(")"); 138 f->Print(")");
137 if (HasICData()) { 139 if (HasICData()) {
138 PrintICData(f, *ic_data()); 140 PrintICData(f, *ic_data());
139 } 141 }
140 } 142 }
141 143
142 144
143 void Computation::PrintOperandsTo(BufferFormatter* f) const { 145 void Computation::PrintOperandsTo(BufferFormatter* f) const {
144 for (int i = 0; i < InputCount(); ++i) { 146 for (int i = 0; i < InputCount(); ++i) {
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { 864 if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
863 f->Print(" ["); 865 f->Print(" [");
864 locations_[i].PrintTo(f); 866 locations_[i].PrintTo(f);
865 f->Print("]"); 867 f->Print("]");
866 } 868 }
867 } 869 }
868 f->Print(" }"); 870 f->Print(" }");
869 } 871 }
870 872
871 } // namespace dart 873 } // 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