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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart

Issue 23003031: Extract interceptor calls from raw is-checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Populate interceptedClasses dynamically Created 7 years, 4 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
Index: sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
index 1ea358de105955dbfad8f026270eba1da86ffdee..cc36e7280a7e853e402c395f200d724651c289e2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
@@ -191,6 +191,11 @@ class SsaSimplifyInterceptors extends HBaseVisitor
} else {
interceptedClasses = new Set<ClassElement>();
for (var user in node.usedBy) {
+ if (user is HIs) {
+ // Is-checks can be performed on any intercepted class.
+ interceptedClasses.addAll(backend.interceptedClasses);
+ break;
+ }
if (user is! HInvoke) continue;
// We don't handle escaping interceptors yet.
interceptedClasses.addAll(
@@ -248,7 +253,6 @@ class SsaSimplifyInterceptors extends HBaseVisitor
return true;
}
-
bool visitOneShotInterceptor(HOneShotInterceptor node) {
HInstruction constant = tryComputeConstantInterceptor(
node.inputs[1], node.interceptedClasses);

Powered by Google App Engine
This is Rietveld 408576698