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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart

Issue 23883004: Fix bug http://code.google.com/p/dart/issues/detail?id=12941 by doing speculative optimizations eve… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
Index: sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart (revision 27115)
+++ sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart (working copy)
@@ -231,12 +231,8 @@
(TypeMask mask) => mask.containedClasses(compiler));
}
- /**
- * Returns whether a [selector] call will hit a method at runtime,
- * and not go through [noSuchMethod].
- */
- bool willHit(Selector selector, Compiler compiler) {
- return disjointMasks.every((e) => e.willHit(selector, compiler));
+ bool understands(Selector selector, Compiler compiler) {
+ return disjointMasks.any((e) => e.understands(selector, compiler));
}
bool needsNoSuchMethodHandling(Selector selector, Compiler compiler) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/type_mask.dart ('k') | tests/compiler/dart2js/bailout_indexable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698