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

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

Issue 1616673002: dart2js cps: Debugging utility and fix idempotency in shrinking reducer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Do not run the same Pass instance twice 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
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 8d139a855da3d618c35bbaa054dbc01a914ba703..62776671f9bc33a71596702f6c7440018d32b12c 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1546,7 +1546,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
// Check that all uses of the iterator are 'moveNext' and 'current'.
assert(!isInterceptedSelector(Selectors.moveNext));
assert(!isInterceptedSelector(Selectors.current));
- for (Reference ref in iterator.effectiveUses) {
+ for (Reference ref in iterator.refinedUses) {
if (ref.parent is! InvokeMethod) return null;
InvokeMethod use = ref.parent;
if (ref != use.receiver) return null;
@@ -1563,7 +1563,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
MutableVariable current = new MutableVariable(new LoopItemEntity());
// Rewrite all uses of the iterator.
- for (Reference ref in iterator.effectiveUses) {
+ for (Reference ref in iterator.refinedUses) {
InvokeMethod use = ref.parent;
if (use.selector == Selectors.current) {
// Rewrite iterator.current to a use of the 'current' variable.
@@ -1772,7 +1772,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
// If there are multiple uses, we cannot eliminate the getter call and
// therefore risk duplicating its side effects.
- if (!isPure && tearOff.hasMultipleEffectiveUses) return null;
+ if (!isPure && tearOff.hasMultipleRefinedUses) return null;
// If the getter call is impure, we risk reordering side effects,
// unless it is immediately prior to the closure call.
@@ -1788,7 +1788,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
sourceInformation: node.sourceInformation);
node.receiver.changeTo(new Parameter(null)); // Remove the tear off use.
- if (tearOff.hasNoEffectiveUses) {
+ if (tearOff.hasNoRefinedUses) {
// Eliminate the getter call if it has no more uses.
// This cannot be delegated to other optimizations because we need to
// avoid duplication of side effects.
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698