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

Issue 233153002: Support assignment to parameters in the dart2dart backend. (Closed)

Created:
6 years, 8 months ago by Kevin Millikin (Google)
Modified:
6 years, 8 months ago
Reviewers:
karlklose, floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support assignment to parameters in the dart2dart backend. Assignments to parameters update the assigned variables during CPS construction. This has the effect of propagating the assigned value to its uses and the original assignment cannot necessarily be recovered in the backend. This enables multiple uses of the same let-bound primitive in the CPS IR, which requires handling by introducing an assignment in the Dart output. The final code is not yet as compact as it could be. For instance: hest(x, y) { x = fisk(x); hest(x, x); } is translated to: hest(x,y){var v0;v0=fisk(x);hest(v0,v0);} R=floitsch@google.com, karlklose@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=34964

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed review comments #

Patch Set 3 : Fixed argument order. Oops. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -16 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart View 1 2 5 chunks +17 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart View 2 chunks +12 lines, -7 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Kevin Millikin (Google)
6 years, 8 months ago (2014-04-10 12:53:01 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/233153002/diff/1/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/233153002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode97 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:97: LetVal(this.hasExactlyOneUse, this.variable, this.definition, this.body); I would put this ...
6 years, 8 months ago (2014-04-10 17:24:46 UTC) #2
Kevin Millikin (Google)
https://codereview.chromium.org/233153002/diff/1/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/233153002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode97 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:97: LetVal(this.hasExactlyOneUse, this.variable, this.definition, this.body); On 2014/04/10 17:24:46, floitsch wrote: ...
6 years, 8 months ago (2014-04-11 08:31:23 UTC) #3
Kevin Millikin (Google)
Committed patchset #3 manually as r34964 (presubmit successful).
6 years, 8 months ago (2014-04-11 08:44:09 UTC) #4
karlklose
6 years, 8 months ago (2014-04-11 08:47:37 UTC) #5
Message was sent while issue was closed.
LGTM.

Powered by Google App Engine
This is Rietveld 408576698