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

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

Issue 328503003: Extend Range analysis to 64-bit range and mint operations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('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/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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 void Range::PrintTo(BufferFormatter* f) const { 277 void Range::PrintTo(BufferFormatter* f) const {
278 f->Print("["); 278 f->Print("[");
279 min_.PrintTo(f); 279 min_.PrintTo(f);
280 f->Print(", "); 280 f->Print(", ");
281 max_.PrintTo(f); 281 max_.PrintTo(f);
282 f->Print("]"); 282 f->Print("]");
283 } 283 }
284 284
285 285
286 const char* Range::ToCString(Range* range) { 286 const char* Range::ToCString(const Range* range) {
287 if (range == NULL) return "[_|_, _|_]"; 287 if (range == NULL) return "[_|_, _|_]";
288 288
289 char buffer[256]; 289 char buffer[256];
290 BufferFormatter f(buffer, sizeof(buffer)); 290 BufferFormatter f(buffer, sizeof(buffer));
291 range->PrintTo(&f); 291 range->PrintTo(&f);
292 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); 292 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer);
293 } 293 }
294 294
295 295
296 void RangeBoundary::PrintTo(BufferFormatter* f) const { 296 void RangeBoundary::PrintTo(BufferFormatter* f) const {
297 switch (kind_) { 297 switch (kind_) {
298 case kSymbol: 298 case kSymbol:
299 f->Print("v%" Pd "", 299 f->Print("v%" Pd "",
300 reinterpret_cast<Definition*>(value_)->ssa_temp_index()); 300 reinterpret_cast<Definition*>(value_)->ssa_temp_index());
301 if (offset_ != 0) f->Print("%+" Pd "", offset_); 301 if (offset_ != 0) f->Print("%+" Pd64 "", offset_);
302 break; 302 break;
303 case kNegativeInfinity: 303 case kNegativeInfinity:
304 f->Print("-inf"); 304 f->Print("-inf");
305 break; 305 break;
306 case kPositiveInfinity: 306 case kPositiveInfinity:
307 f->Print("+inf"); 307 f->Print("+inf");
308 break; 308 break;
309 case kConstant: 309 case kConstant:
310 f->Print("%" Pd "", value_); 310 f->Print("%" Pd64 "", value_);
311 break; 311 break;
312 case kUnknown: 312 case kUnknown:
313 f->Print("_|_"); 313 f->Print("_|_");
314 break; 314 break;
315 } 315 }
316 } 316 }
317 317
318 318
319 const char* RangeBoundary::ToCString() const { 319 const char* RangeBoundary::ToCString() const {
320 char buffer[256]; 320 char buffer[256];
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1061 }
1062 1062
1063 const char* Environment::ToCString() const { 1063 const char* Environment::ToCString() const {
1064 char buffer[1024]; 1064 char buffer[1024];
1065 BufferFormatter bf(buffer, 1024); 1065 BufferFormatter bf(buffer, 1024);
1066 PrintTo(&bf); 1066 PrintTo(&bf);
1067 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); 1067 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer);
1068 } 1068 }
1069 1069
1070 } // namespace dart 1070 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698