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

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

Issue 10807069: Split TypeGuard and BailoutTarget. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 5 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
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/tracer.dart
diff --git a/lib/compiler/implementation/ssa/tracer.dart b/lib/compiler/implementation/ssa/tracer.dart
index 1e163d67c3a7d1ffa0cfab2592e2dfd372852b29..eab32e1e22c0350c9a543adf4e471ab5e3a4fbd9 100644
--- a/lib/compiler/implementation/ssa/tracer.dart
+++ b/lib/compiler/implementation/ssa/tracer.dart
@@ -204,6 +204,16 @@ class HInstructionStringifier implements HVisitor<String> {
return "$prefix${instruction.id}";
}
+ String visitBailoutTarget(HBailoutTarget node) {
+ StringBuffer envBuffer = new StringBuffer();
+ List<HInstruction> inputs = node.inputs;
+ for (int i = 0; i < inputs.length; i++) {
+ envBuffer.add(" ${temporaryId(inputs[i])}");
+ }
+ String on = node.isEnabled ? "enabled" : "disabled";
+ return "BailoutTarget($on): id: ${node.state} env: $envBuffer";
+ }
+
String visitBoolify(HBoolify node) {
return "Boolify: ${temporaryId(node.inputs[0])}";
}
@@ -479,16 +489,21 @@ class HInstructionStringifier implements HVisitor<String> {
} else {
throw new CompilerCancelledException('Unexpected type guard: $type');
}
+ HInstruction guarded = node.guarded;
+ HInstruction bailoutTarget = node.bailoutTarget;
StringBuffer envBuffer = new StringBuffer();
List<HInstruction> inputs = node.inputs;
- for (int i = 0; i < inputs.length; i++) {
- if (inputs[i] !== node.guarded) {
- envBuffer.add(" ${temporaryId(inputs[i])}");
- }
+ assert(inputs.length >= 2);
+ assert(inputs[0] == guarded);
+ assert(inputs[1] == bailoutTarget);
+ for (int i = 2; i < inputs.length; i++) {
+ envBuffer.add(" ${temporaryId(inputs[i])}");
}
String on = node.isEnabled ? "enabled" : "disabled";
- String id = temporaryId(node.guarded);
- return "TypeGuard($on): $id is $type env: $envBuffer";
+ String guardedId = temporaryId(node.guarded);
+ String bailoutId = temporaryId(node.bailoutTarget);
+ return "TypeGuard($on): $guardedId is $type bailout: $bailoutId "
+ "env: $envBuffer";
}
String visitIs(HIs node) {
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698