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

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

Issue 1571433002: dart2js cps: Compute intercepted classes in optimize_interceptors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 11 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 | « pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart ('k') | pkg/compiler/lib/src/cps_ir/gvn.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 08754637f4c187a307689a56a18f6276804c1566..e5953af9eda4de4133e4b05586016cda76c2decb 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -1484,62 +1484,6 @@ class Interceptor extends Primitive {
final Set<ClassElement> interceptedClasses = new Set<ClassElement>();
final SourceInformation sourceInformation;
- /// The input was a self-interceptor.
- static const int SELF_INTERCEPT = 1 << 0;
-
- /// A non-null value was mapped to an interceptor that was mentioned in
- /// [interceptedClasses].
- static const int NON_NULL_INTERCEPT_EXACT = 1 << 1;
-
- /// A non-null value was mapped to an interceptor that is a subclass of
- /// one mentioned in [interceptedClasses].
- static const int NON_NULL_INTERCEPT_SUBCLASS = 1 << 2;
-
- /// A non-null intercepted value was bypassed because none of its supertypes
- /// were mentioned in [interceptedClasses].
- static const int NON_NULL_BYPASS = 1 << 3;
-
- /// Null was returned as-is.
- static const int NULL_BYPASS = 1 << 4;
-
- /// Null was mapped to JSNull, which was mentioned in [interceptedClasses].
- static const int NULL_INTERCEPT_EXACT = 1 << 5;
-
- /// Null was mapped to JSNull, because a superclass thereof (the interceptor
- /// root class) was mentioned in [interceptedClasses].
- static const int NULL_INTERCEPT_SUBCLASS = 1 << 6;
-
- static const int NON_NULL_INTERCEPT = NON_NULL_INTERCEPT_EXACT |
- NON_NULL_INTERCEPT_SUBCLASS;
- static const int NULL_INTERCEPT = NULL_INTERCEPT_EXACT |
- NULL_INTERCEPT_SUBCLASS;
- static const int NULL = NULL_BYPASS |
- NULL_INTERCEPT;
- static const int INTERCEPT_EXACT = NON_NULL_INTERCEPT_EXACT |
- NULL_INTERCEPT_EXACT;
- static const int INTERCEPT_SUBCLASS = NON_NULL_INTERCEPT_SUBCLASS |
- NULL_INTERCEPT_SUBCLASS;
- static const int INTERCEPT = NULL_INTERCEPT | NON_NULL_INTERCEPT;
- static const int BYPASS = NULL_BYPASS | NON_NULL_BYPASS;
-
- static const int ALL_FLAGS = SELF_INTERCEPT | BYPASS | INTERCEPT;
-
- /// Which of the above cases may happen at runtime. Set by type propagation.
- int flags = ALL_FLAGS;
-
- void clearFlag(int flag) {
- flags &= ~flag;
- }
-
- bool get isAlwaysIntercepted => flags & ~INTERCEPT == 0;
- bool get isAlwaysNullOrIntercepted => flags & ~(NULL | INTERCEPT) == 0;
-
- /// If the value is intercepted, it always matches exactly a class in
- /// [interceptedClasses].
- bool get isInterceptedClassAlwaysExact {
- return flags & (INTERCEPT & ~INTERCEPT_EXACT) == 0;
- }
-
Interceptor(Primitive input, this.sourceInformation)
: this.input = new Reference<Primitive>(input);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart ('k') | pkg/compiler/lib/src/cps_ir/gvn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698