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

Unified Diff: lib/compiler/implementation/ssa/tracer.dart

Issue 10454049: Validate that all instructions dominate their inputs. And fix a bug where that did not happen. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/tracer.dart
===================================================================
--- lib/compiler/implementation/ssa/tracer.dart (revision 8084)
+++ lib/compiler/implementation/ssa/tracer.dart (working copy)
@@ -23,6 +23,7 @@
if (enabled) output.closeSync();
}
+ String method;
Lasse Reichstein Nielsen 2012/05/30 09:35:14 Is this used?
ngeoffray 2012/05/30 10:19:07 Leftover debugging. Removed.
void traceCompilation(String methodName) {
tag("compilation", () {
printProperty("name", methodName);
@@ -235,12 +236,12 @@
String visitExit(HExit node) => "exit";
String visitFieldGet(HFieldGet node) {
- return 'get ${node.name.slowToString()}';
+ return 'get ${temporaryId(node.receiver)}';
}
String visitFieldSet(HFieldSet node) {
String valueId = temporaryId(node.value);
- return 'set ${node.name.slowToString()} to $valueId';
+ return 'set ${temporaryId(node.receiver)} to $valueId';
}
String visitGoto(HGoto node) {
@@ -394,19 +395,18 @@
String visitTry(HTry node) {
List<HBasicBlock> successors = currentBlock.successors;
String tryBlock = 'B${successors[0].id}';
- StringBuffer catchBlocks = new StringBuffer();
- for (int i = 1; i < successors.length - 1; i++) {
- catchBlocks.add('B${successors[i].id}, ');
+ String catchBlock = 'none';
+ if (node.catchBlock != null) {
+ catchBlock = 'B${successors[1].id}';
}
- String finallyBlock;
+ String finallyBlock = 'none';
if (node.finallyBlock != null) {
finallyBlock = 'B${node.finallyBlock.id}';
- } else {
- catchBlocks.add('B${successors[successors.length - 1].id}');
- finallyBlock = 'none';
}
- return "Try: $tryBlock, Catch: $catchBlocks, Finally: $finallyBlock";
+
+ return "Try: $tryBlock, Catch: $catchBlock, Finally: $finallyBlock, "
+ "Join: B${successors.last().id}";
}
String visitTypeGuard(HTypeGuard node) {

Powered by Google App Engine
This is Rietveld 408576698