Index: pkg/compiler/lib/src/ssa/nodes.dart |
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart |
index 4b55e487b426625aceecb7cccace852275681ac0..ac9a5429244a1dc541c0b8f0b5137c0eb7915e52 100644 |
--- a/pkg/compiler/lib/src/ssa/nodes.dart |
+++ b/pkg/compiler/lib/src/ssa/nodes.dart |
@@ -2265,6 +2265,17 @@ class HLocalValue extends HInstruction { |
class HParameterValue extends HLocalValue { |
HParameterValue(Entity variable, type) : super(variable, type); |
+ // [HParameterValue]s are either the value of the parameter (in fully SSA |
+ // converted code), or the mutable variable containing the value (in |
+ // incompletely SSA converted code, e.g. methods containing exceptions). |
+ bool usedAsVariable() { |
+ for (HInstruction user in usedBy) { |
+ if (user is HLocalGet) return true; |
+ if (user is HLocalSet && user.local == this) return true; |
+ } |
+ return false; |
+ } |
+ |
toString() => 'parameter ${sourceElement.name}'; |
accept(HVisitor visitor) => visitor.visitParameterValue(this); |
} |