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

Issue 918653002: Propagate pseudo-constants expressions separately in tree rewriter. (Closed)

Created:
5 years, 10 months ago by asgerf
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Propagate pseudo-constants expressions separately in tree rewriter. Two constants would fail to swap places even though there clearly is no danger of swapping side effects. Moreover, a constant would prevent other expressions from propagating. Example: var z = foo(); var y = 1; bar('x', y, z); // neither foo() or 1 propagates past 'x' This change may be made redundant in the future by a more sophisticated side-effect analysis. But for now, it helps debugging since the code is more readable and it's easier to see if other rewritings are working when they are not blocked by redundant variable assignments. BUG= R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=43953

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comment, bugfix, and test case #

Total comments: 1

Patch Set 3 : Fix indentation in test case #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -125 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 12 chunks +101 lines, -66 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 chunk +3 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart View 1 chunk +2 lines, -1 line 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart View 1 2 3 3 chunks +3 lines, -7 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart View 1 2 3 4 chunks +12 lines, -20 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart View 1 chunk +2 lines, -7 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart View 3 chunks +5 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart View 1 chunk +1 line, -4 lines 0 comments Download
A + tests/language/propagate_past_constant_test.dart View 1 2 3 1 chunk +12 lines, -11 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
asgerf
5 years, 10 months ago (2015-02-11 17:29:49 UTC) #2
Kevin Millikin (Google)
Yay! LGTM. https://codereview.chromium.org/918653002/diff/1/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart File pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart (right): https://codereview.chromium.org/918653002/diff/1/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart#newcode203 pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart:203: // the previous assignment might still propagate. ...
5 years, 10 months ago (2015-02-12 11:52:51 UTC) #3
asgerf
Bugfix: I had to strengthen the requirement for an assignment to be inlinable as a ...
5 years, 10 months ago (2015-02-12 12:31:14 UTC) #5
Kevin Millikin (Google)
Good catch. LGTM.
5 years, 10 months ago (2015-02-12 14:25:43 UTC) #6
asgerf
5 years, 10 months ago (2015-02-23 12:57:50 UTC) #8
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as 43953 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698