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

Issue 10962015: Rewrite blocks of single operator into just a single operator. (Closed)

Created:
8 years, 3 months ago by Anton Muhin
Modified:
8 years, 3 months ago
Reviewers:
Roman
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Rewrite blocks of single operator into just a single operator. There is an imporant exception, although somewhat artificial: if block consists of variable definitions, we shouldn't do that not to break scoping rules and violations. R=smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=12764

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -1 line) Patch
M lib/compiler/implementation/dart_backend/backend.dart View 1 1 chunk +16 lines, -1 line 3 comments Download

Messages

Total messages: 6 (0 generated)
Anton Muhin
8 years, 3 months ago (2012-09-20 19:31:58 UTC) #1
Roman
https://codereview.chromium.org/10962015/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10962015/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode85 lib/compiler/implementation/dart_backend/backend.dart:85: rewritTo(Statement statement) { rewriteTo? "rewriteTo" is a weird name. ...
8 years, 3 months ago (2012-09-21 08:10:37 UTC) #2
Anton Muhin
https://codereview.chromium.org/10962015/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10962015/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode85 lib/compiler/implementation/dart_backend/backend.dart:85: rewritTo(Statement statement) { On 2012/09/21 08:10:37, Roman wrote: > ...
8 years, 3 months ago (2012-09-21 12:02:14 UTC) #3
Roman
https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementation/dart_backend/backend.dart#newcode85 lib/compiler/implementation/dart_backend/backend.dart:85: rewritTo(Statement statement) { tryRewriteSingleStatementBlock?
8 years, 3 months ago (2012-09-21 12:10:27 UTC) #4
Anton Muhin
https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementation/dart_backend/backend.dart#newcode85 lib/compiler/implementation/dart_backend/backend.dart:85: rewritTo(Statement statement) { On 2012/09/21 12:10:27, Roman wrote: > ...
8 years, 3 months ago (2012-09-21 12:13:08 UTC) #5
Roman
8 years, 3 months ago (2012-09-21 12:16:00 UTC) #6
lgtm

https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementatio...
File lib/compiler/implementation/dart_backend/backend.dart (right):

https://codereview.chromium.org/10962015/diff/4001/lib/compiler/implementatio...
lib/compiler/implementation/dart_backend/backend.dart:85: rewritTo(Statement
statement) {
On 2012/09/21 12:13:08, Anton Muhin wrote:
> On 2012/09/21 12:10:27, Roman wrote:
> > tryRewriteSingleStatementBlock?
> 
> There should be no references to single statement block as this will
eventually
> do all the kinds of rewrites.
> 
> And why try if it always returns something?

then just rewriteStatement?

side note: does 'try' mean 'sometimes return something'?

Powered by Google App Engine
This is Rietveld 408576698