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 c9a4c2a328cb5afbdd663ce2c8ba12eb08c39863..3b119bddb7984a5382b6a7de9b96cfcd120de00d 100644 |
--- a/pkg/compiler/lib/src/ssa/nodes.dart |
+++ b/pkg/compiler/lib/src/ssa/nodes.dart |
@@ -198,6 +198,10 @@ class HGraph { |
HConstant result = constants[constant]; |
// TODO(johnniwinther): Support source information per constant reference. |
if (result == null) { |
+ if (!constant.isConstant) { |
+ // We use `null` as the value for invalid constant expressions. |
+ constant = const NullConstantValue(); |
+ } |
TypeMask type = computeTypeMask(compiler, constant); |
result = new HConstant.internal(constant, type) |
..sourceInformation = sourceInformation; |