Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
index 89ba30e56ce1fef3d7af51928b71b8168065b6d5..ab50d3155c4a291d166770e61c463686da9f5289 100644 |
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
@@ -145,6 +145,14 @@ class KernelAstAdapter { |
getGetterSelector(getter), typeOfGet(getter), _compiler); |
} |
+ ConstantValue getConstantFor(ir.Node node) { |
+ ConstantValue constantValue = |
+ _backend.constants.getConstantValueForNode(getNode(node), _elements); |
+ assert(invariant(getNode(node), constantValue != null, |
+ message: 'No constant computed for $node')); |
+ return constantValue; |
+ } |
+ |
bool isIntercepted(ir.Node node) { |
Selector selector; |
if (node is ir.PropertyGet) { |