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

Issue 223783002: Support ExpressionStatement 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 ExpressionStatement in the dart2dart backend. Before, the only supported statements were blocks, empty statements, and return statements. This change requires supporting definitions (let-bound and continuation parameters) that are unused in the CPS-based IR. They translate to sequence expressions in the Tree IR. R=floitsch@google.com, karlklose@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=34731

Patch Set 1 #

Total comments: 5

Patch Set 2 : Ensure that a removed 'return' is really a 'return'. #

Total comments: 1

Patch Set 3 : Also check for null. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -12 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart View 1 2 7 chunks +53 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart View 4 chunks +20 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Kevin Millikin (Google)
6 years, 8 months ago (2014-04-03 11:53:06 UTC) #1
Kevin Millikin (Google)
https://codereview.chromium.org/223783002/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/223783002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode70 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:70: * The value of the sequence is the value ...
6 years, 8 months ago (2014-04-03 12:00:55 UTC) #2
floitsch
LGTM with comments. Haven't verified the reduction rules, though. https://codereview.chromium.org/223783002/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/223783002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode78 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:78: ...
6 years, 8 months ago (2014-04-03 12:31:16 UTC) #3
Kevin Millikin (Google)
https://codereview.chromium.org/223783002/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/223783002/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode518 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:518: statements.removeLast(); On 2014/04/03 12:31:16, floitsch wrote: > assert that ...
6 years, 8 months ago (2014-04-03 12:52:46 UTC) #4
Kevin Millikin (Google)
Now I verify that the last statement is a return before removing it. Please take ...
6 years, 8 months ago (2014-04-04 10:42:54 UTC) #5
floitsch
Fyi. https://codereview.chromium.org/223783002/diff/20001/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/223783002/diff/20001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode515 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:515: for (var n in nodes) { Why not ...
6 years, 8 months ago (2014-04-04 11:14:27 UTC) #6
Kevin Millikin (Google)
On 2014/04/04 11:14:27, floitsch wrote: > Fyi. > > https://codereview.chromium.org/223783002/diff/20001/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart > File sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart > (right): ...
6 years, 8 months ago (2014-04-04 11:39:53 UTC) #7
floitsch
LGTM.
6 years, 8 months ago (2014-04-04 11:46:18 UTC) #8
Kevin Millikin (Google)
6 years, 8 months ago (2014-04-04 12:31:43 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 manually as r34731 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698