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

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

Issue 10543027: Fixes for checked mode and change buildbot script to run dart2js tests in checked mode also. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 8378)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -964,16 +964,27 @@
bool dataEquals(HInstruction other) => true;
}
-class HCheck extends HInstruction {
+/**
+ * A [HCheck] instruction is an instruction that might do a dynamic
+ * check at runtime on another instruction. To have proper instruction
+ * dependencies in the graph, instructions that depend on the check
+ * being done reference the [HCheck] instruction instead of the
+ * instruction itself.
+ */
+abstract class HCheck extends HInstruction {
HCheck(inputs) : super(inputs);
-
- // TODO(floitsch): make class abstract instead of adding an abstract method.
- abstract accept(HVisitor visitor);
-
HInstruction get checkedInput() => inputs[0];
}
-class HTypeGuard extends HCheck {
+/**
+ * A [HCheckStatement] instruction is a [HCheck instruction] that
+ * cannot be generated as an expression.
+ */
+abstract class HCheckStatement extends HCheck {
+ HCheckStatement(inputs) : super(inputs);
+}
+
+class HTypeGuard extends HCheckStatement {
final int state;
final HType guardedType;
bool isOn = false;
@@ -1001,7 +1012,7 @@
bool dataEquals(HTypeGuard other) => guardedType == other.guardedType;
}
-class HBoundsCheck extends HCheck {
+class HBoundsCheck extends HCheckStatement {
static final int ALWAYS_FALSE = 0;
static final int FULL_CHECK = 1;
static final int ALWAYS_ABOVE_ZERO = 2;
@@ -1031,7 +1042,7 @@
bool dataEquals(HInstruction other) => true;
}
-class HIntegerCheck extends HCheck {
+class HIntegerCheck extends HCheckStatement {
bool alwaysFalse = false;
HIntegerCheck(value) : super(<HInstruction>[value]);

Powered by Google App Engine
This is Rietveld 408576698