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

Issue 980853002: dart2dart: Bugfix in copy propagator. (Closed)

Created:
5 years, 9 months ago by asgerf
Modified:
5 years, 9 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

dart2dart: Bugfix in copy propagator and rename Assign.definition->value. Do not copy propagate variable if: - The variable is accessed from an inner function. - We are inside a try block. - The moving assignment is a declaration. The last point could be fixed by making the new assignment a declaration as well, but for now I focused on fixing bugs and not making improvements. I suspect the copy propagator will disappear entirely after the new register allocator lands, but these bugs are currently blocking the integrity checker from landing, and I want to land that first. BUG= R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=44284

Patch Set 1 #

Total comments: 2

Patch Set 2 : Only force declaration of variables that are captured #

Patch Set 3 : Renamed Assign.definition -> value and break up long condition #

Total comments: 2

Patch Set 4 : Updated comment #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -34 lines) Patch
M pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/codegen.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart View 1 2 3 5 chunks +22 lines, -11 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 2 5 chunks +6 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 3 chunks +7 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart View 1 2 4 chunks +9 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (1 generated)
asgerf
5 years, 9 months ago (2015-03-05 12:41:42 UTC) #2
Kevin Millikin (Google)
Code LGTM but I have some naming suggestions and the comment at the site mentioned ...
5 years, 9 months ago (2015-03-06 09:30:33 UTC) #3
asgerf
https://codereview.chromium.org/980853002/diff/1/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart File pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart (right): https://codereview.chromium.org/980853002/diff/1/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart#newcode176 pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart:176: if (node.definition is VariableUse && !node.isDeclaration && On 2015/03/06 ...
5 years, 9 months ago (2015-03-06 10:01:37 UTC) #4
Kevin Millikin (Google)
Still LGTM. https://codereview.chromium.org/980853002/diff/40001/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart File pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart (right): https://codereview.chromium.org/980853002/diff/40001/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart#newcode175 pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart:175: // isolate the uses of w to ...
5 years, 9 months ago (2015-03-06 10:27:30 UTC) #5
asgerf
https://codereview.chromium.org/980853002/diff/40001/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart File pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart (right): https://codereview.chromium.org/980853002/diff/40001/pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart#newcode175 pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart:175: // isolate the uses of w to a given ...
5 years, 9 months ago (2015-03-06 10:49:20 UTC) #6
asgerf
5 years, 9 months ago (2015-03-06 10:58:58 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as 44284 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698