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

Side by Side Diff: lib/compiler/implementation/ssa/tracer.dart

Issue 10116023: Don't rely on any speculative type in the bailout version. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 8 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library('tracer'); 5 #library('tracer');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('ssa.dart'); 8 #import('ssa.dart');
9 #import('../leg.dart'); 9 #import('../leg.dart');
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 finallyBlock = 'B${node.finallyBlock.id}'; 396 finallyBlock = 'B${node.finallyBlock.id}';
397 } else { 397 } else {
398 catchBlocks.add('B${successors[successors.length - 1].id}'); 398 catchBlocks.add('B${successors[successors.length - 1].id}');
399 finallyBlock = 'none'; 399 finallyBlock = 'none';
400 } 400 }
401 return "Try: $tryBlock, Catch: $catchBlocks, Finally: $finallyBlock"; 401 return "Try: $tryBlock, Catch: $catchBlocks, Finally: $finallyBlock";
402 } 402 }
403 403
404 String visitTypeGuard(HTypeGuard node) { 404 String visitTypeGuard(HTypeGuard node) {
405 String type; 405 String type;
406 switch (node.propagatedType) { 406 switch (node.guardedType) {
407 case HType.MUTABLE_ARRAY: type = "mutable_array"; break; 407 case HType.MUTABLE_ARRAY: type = "mutable_array"; break;
408 case HType.READABLE_ARRAY: type = "readable_array"; break; 408 case HType.READABLE_ARRAY: type = "readable_array"; break;
409 case HType.BOOLEAN: type = "bool"; break; 409 case HType.BOOLEAN: type = "bool"; break;
410 case HType.INTEGER: type = "integer"; break; 410 case HType.INTEGER: type = "integer"; break;
411 case HType.DOUBLE: type = "double"; break; 411 case HType.DOUBLE: type = "double"; break;
412 case HType.NUMBER: type = "number"; break; 412 case HType.NUMBER: type = "number"; break;
413 case HType.STRING: type = "string"; break; 413 case HType.STRING: type = "string"; break;
414 case HType.STRING_OR_ARRAY: type = "string_or_array"; break; 414 case HType.STRING_OR_ARRAY: type = "string_or_array"; break;
415 case HType.UNKNOWN: type = 'unknown'; break; 415 case HType.UNKNOWN: type = 'unknown'; break;
416 default: unreachable(); 416 default: unreachable();
417 } 417 }
418 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; 418 String onString = node.isOn ? "on" : "off";
419 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type ($onString)";
419 } 420 }
420 421
421 String visitIs(HIs node) { 422 String visitIs(HIs node) {
422 String type = node.typeName.toString(); 423 String type = node.typeName.toString();
423 return "TypeTest: ${temporaryId(node.expression)} is $type"; 424 return "TypeTest: ${temporaryId(node.expression)} is $type";
424 } 425 }
425 } 426 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/optimize.dart ('k') | lib/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698