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

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: Fix optimization of interceptors for HIs. 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..f63ec0bae4ff83197205b2887dc33dd70c7662f6 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
@@ -191,6 +191,12 @@ class SsaSimplifyInterceptors extends HBaseVisitor
} else {
interceptedClasses = new Set<ClassElement>();
for (var user in node.usedBy) {
+ if (user is HIs) {
ngeoffray 2013/08/26 09:10:23 Add a comment.
Johnni Winther 2013/08/27 08:45:44 Done.
+ // TODO(johnniwinther): Optimize for is-checks that actually need the
+ // interceptor.
ngeoffray 2013/08/26 09:10:23 I think you should move this TODO in the builder:
Johnni Winther 2013/08/27 08:45:44 Done.
+ interceptedClasses.addAll(backend.interceptedClasses);
+ break;
+ }
if (user is! HInvoke) continue;
// We don't handle escaping interceptors yet.
interceptedClasses.addAll(
@@ -248,7 +254,7 @@ class SsaSimplifyInterceptors extends HBaseVisitor
return true;
}
-
+
ngeoffray 2013/08/26 09:10:23 Get rid of extra line.
Johnni Winther 2013/08/27 08:45:44 Done.
bool visitOneShotInterceptor(HOneShotInterceptor node) {
HInstruction constant = tryComputeConstantInterceptor(
node.inputs[1], node.interceptedClasses);

Powered by Google App Engine
This is Rietveld 408576698