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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1322403002: dart2js cps: Change interceptor pipeline. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/let_sinking.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/let_sinking.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698