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

Unified Diff: pkg/compiler/lib/src/ssa/types_propagation.dart

Issue 2619813005: Use entities in various ssa helpers. (Closed)
Patch Set: Fix. Created 3 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
Index: pkg/compiler/lib/src/ssa/types_propagation.dart
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index 0500c92bb56c122b26d87141d31dc08d5f01f016..5b1473a762adc9f103ad32226529370853bdb82b 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import '../compiler.dart' show Compiler;
-import '../elements/elements.dart';
+import '../elements/entities.dart';
import '../js_backend/js_backend.dart';
import '../types/types.dart';
import '../universe/selector.dart' show Selector;
@@ -276,13 +276,12 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
HTypeConversion.RECEIVER_TYPE_CHECK);
return true;
} else if (instruction.element == null) {
- Iterable<Element> targets = closedWorld.allFunctions
+ Iterable<MemberEntity> targets = closedWorld.allFunctions
.filter(instruction.selector, instruction.mask);
if (targets.length == 1) {
- MemberElement target = targets.first;
- ClassElement cls = target.enclosingClass;
- TypeMask type =
- new TypeMask.nonNullSubclass(cls.declaration, closedWorld);
+ MemberEntity target = targets.first;
+ ClassEntity cls = target.enclosingClass;
+ TypeMask type = new TypeMask.nonNullSubclass(cls, closedWorld);
Siggi Cherem (dart-lang) 2017/01/11 23:58:51 just checking: was this .declaration just unnecess
Johnni Winther 2017/01/12 12:01:48 Yes.
// TODO(ngeoffray): We currently only optimize on primitive
// types.
if (!type.satisfies(backend.helpers.jsIndexableClass, closedWorld) &&

Powered by Google App Engine
This is Rietveld 408576698