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

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

Issue 1289933002: Trace CHA optimizations (where, when, why) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: s Created 5 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
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/object.cc » ('j') | 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 eliminated ? "more" : "not more", 161 eliminated ? "more" : "not more",
162 String::Handle(dst_type.Name()).ToCString(), 162 String::Handle(dst_type.Name()).ToCString(),
163 dst_name.ToCString()); 163 dst_name.ToCString());
164 } 164 }
165 165
166 166
167 void CompileType::PrintTo(BufferFormatter* f) const { 167 void CompileType::PrintTo(BufferFormatter* f) const {
168 const char* type_name = "?"; 168 const char* type_name = "?";
169 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) { 169 if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
170 const Class& cls = 170 const Class& cls =
171 Class::Handle(Isolate::Current()->class_table()->At(cid_)); 171 Class::Handle(Isolate::Current()->class_table()->At(cid_));
172 type_name = String::Handle(cls.PrettyName()).ToCString(); 172 type_name = String::Handle(cls.PrettyName()).ToCString();
173 } else if (type_ != NULL && 173 } else if (type_ != NULL &&
174 !type_->Equals(Type::Handle(Type::DynamicType()))) { 174 !type_->Equals(Type::Handle(Type::DynamicType()))) {
175 type_name = type_->ToCString(); 175 type_name = type_->ToCString();
176 } else if (!is_nullable()) { 176 } else if (!is_nullable()) {
177 type_name = "!null"; 177 type_name = "!null";
178 } 178 }
179 179
180 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : ""); 180 f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : "");
181 } 181 }
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 } 1212 }
1213 1213
1214 const char* Environment::ToCString() const { 1214 const char* Environment::ToCString() const {
1215 char buffer[1024]; 1215 char buffer[1024];
1216 BufferFormatter bf(buffer, 1024); 1216 BufferFormatter bf(buffer, 1024);
1217 PrintTo(&bf); 1217 PrintTo(&bf);
1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer);
1219 } 1219 }
1220 1220
1221 } // namespace dart 1221 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698