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

Issue 312793002: dart2dart: Preserve variable names throughout the IR. (Closed)

Created:
6 years, 6 months ago by asgerf
Modified:
6 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

dart2dart: Preserve variable names throughout the IR. I had to add register allocation to avoid unsoundness in some cases where an expression needs to reference a previous version of a variable. Register allocation is disabled for variables without an associated element, because it will typically block inlining of these variables. BUG= R=kmillikin@google.com, sigurdm@google.com Committed: https://code.google.com/p/dart/source/detail?r=37312

Patch Set 1 #

Total comments: 14

Patch Set 2 : Proper name synthesis + Sigurd's comments #

Patch Set 3 : Handle InvokeConstConstructor #

Total comments: 3

Patch Set 4 : Removed lifting analysis #

Patch Set 5 : Removed Definition.binding #

Total comments: 12

Patch Set 6 : Kevin's comments #

Patch Set 7 : SVN rebase #

Patch Set 8 : SVN rebase (after static-fields committed) #

Patch Set 9 : Properly linearize phi assignments, remove unused write count #

Total comments: 5

Patch Set 10 : SVN rebase #

Patch Set 11 : Renamed rewrite_swap => rewrite_swap_test so it actually runs #

Patch Set 12 : Formatting issues #

Patch Set 13 : Sigurd's comments #

Patch Set 14 : SVN rebase #

Patch Set 15 : Share temporary variable between different calls to buildPhiAssignments #

Patch Set 16 : SVN rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -104 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +41 lines, -16 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 19 chunks +172 lines, -71 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +6 lines, -8 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart View 1 2 3 4 5 6 7 8 9 9 chunks +14 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart View 1 2 3 4 5 6 7 4 chunks +162 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart View 1 2 3 chunks +15 lines, -3 lines 0 comments Download
A tests/language/rewrite_swap_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +90 lines, -0 lines 0 comments Download
A tests/language/rewrite_variable_initializer_test.dart View 1 chunk +40 lines, -0 lines 0 comments Download
M tests/language/rewrite_while_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
asgerf
https://codereview.chromium.org/312793002/diff/1/tests/language/rewrite_variable_initializer_test.dart File tests/language/rewrite_variable_initializer_test.dart (right): https://codereview.chromium.org/312793002/diff/1/tests/language/rewrite_variable_initializer_test.dart#newcode23 tests/language/rewrite_variable_initializer_test.dart:23: return bar(x,y); Without register allocation, this reference to 'y' ...
6 years, 6 months ago (2014-06-03 14:37:16 UTC) #1
sigurdm
lgtm https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart (right): https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart#newcode176 sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart:176: String getVariableName(tree.Variable variable) { Maybe move this to ...
6 years, 6 months ago (2014-06-04 07:51:57 UTC) #2
asgerf
https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart (right): https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart#newcode176 sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart:176: String getVariableName(tree.Variable variable) { On 2014/06/04 07:51:56, sigurdm wrote: ...
6 years, 6 months ago (2014-06-04 09:40:51 UTC) #3
sigurdm
https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart (right): https://codereview.chromium.org/312793002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart#newcode176 sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart:176: String getVariableName(tree.Variable variable) { On 2014/06/04 09:40:51, asgerf wrote: ...
6 years, 6 months ago (2014-06-04 10:29:39 UTC) #4
asgerf
I've decided to put this on hold until we can come up with a simpler ...
6 years, 6 months ago (2014-06-04 14:14:28 UTC) #5
asgerf
I removed the lifting analysis and reopened the CL. A better solution is still warranted ...
6 years, 6 months ago (2014-06-04 14:49:17 UTC) #6
Kevin Millikin (Google)
LGTM with comments. https://codereview.chromium.org/312793002/diff/40001/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart File sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart (right): https://codereview.chromium.org/312793002/diff/40001/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart#newcode577 sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart:577: /// Returns the deepest of the ...
6 years, 6 months ago (2014-06-10 11:33:01 UTC) #7
asgerf
https://codereview.chromium.org/312793002/diff/80001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart (right): https://codereview.chromium.org/312793002/diff/80001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode91 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:91: int writeCount = 0; On 2014/06/10 11:33:01, kmillikin wrote: ...
6 years, 6 months ago (2014-06-10 12:22:24 UTC) #8
asgerf
PTAL at patch 9 (delta with 8). There was a problem when generating phi assignments, ...
6 years, 6 months ago (2014-06-12 11:49:41 UTC) #9
sigurdm
lgtm https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart (right): https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode552 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:552: return; Can be on one line https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode648 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:648: ...
6 years, 6 months ago (2014-06-12 14:12:19 UTC) #10
asgerf
https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart (right): https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode552 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:552: return; On 2014/06/12 14:12:19, sigurdm wrote: > Can be ...
6 years, 6 months ago (2014-06-12 15:24:15 UTC) #11
sigurdm
https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart File sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart (right): https://codereview.chromium.org/312793002/diff/230001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode648 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:648: return buildContinuationAssignment(cont.parameters[0], invoke, On 2014/06/12 15:24:15, asgerf wrote: > ...
6 years, 6 months ago (2014-06-13 07:40:07 UTC) #12
asgerf
6 years, 6 months ago (2014-06-13 12:51:09 UTC) #13
Message was sent while issue was closed.
Committed patchset #16 manually as r37312 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698