Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
index c0c4942f3e0c7cfde46c29356ae4acc5c907df8e..d93de7b50d0fc73853e52e866bf4cfdc9468c2a9 100644 |
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart |
@@ -4,7 +4,7 @@ |
library dart2js.ir_nodes; |
import 'dart:collection'; |
-import '../constants/values.dart' as values show ConstantValue; |
+import '../constants/values.dart' as values; |
import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
import '../elements/elements.dart'; |
import '../io/source_information.dart' show SourceInformation; |
@@ -969,6 +969,18 @@ class Interceptor extends Primitive { |
final Set<ClassElement> interceptedClasses = new Set<ClassElement>(); |
final SourceInformation sourceInformation; |
+ /// If non-null, all uses of this the interceptor call are guaranteed to |
+ /// see this value. |
+ /// |
+ /// The interceptor call is not immediately replaced by the constant, because |
+ /// that might prevent the interceptor from being shared. |
+ /// |
+ /// The precise input type is not known when sharing interceptors, because |
+ /// refinement nodes have been removed by then. So this field carries the |
+ /// known constant until we know if it should be shared or replaced by |
+ /// the constant. |
+ values.InterceptorConstantValue constantValue; |
+ |
Interceptor(Primitive input, this.sourceInformation) |
: this.input = new Reference<Primitive>(input); |