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

Issue 366853007: dart2dart: Support for inner functions in new IR. (Closed)

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

Description

dart2dart: Support for inner functions in new IR. In CPS, closure variables are modeled as ref cells. In tree, variables are in scope within inner functions and closure variables are handled directly. In Dart, a function must be declared if it has a return type or is recursive. Therefore tree now has both FunctionExpression and FunctionDeclaration, the latter is mainly to be used for functions that cannot occur in expression context. The CPS also has two ways of creating functions, CreateFunction and DeclareFunction, but here the latter is only strictly necessary for recursive function. The CL also contains quite a bit of other code improvements that came along. BUG= R=kmillikin@google.com, sigurdm@google.com Committed: https://code.google.com/p/dart/source/detail?r=38005

Patch Set 1 #

Total comments: 7

Patch Set 2 : Sigurd's comments #

Patch Set 3 : SVN rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+987 lines, -291 lines) Patch
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart View 17 chunks +181 lines, -52 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart View 2 chunks +8 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart View 1 2 31 chunks +395 lines, -92 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart View 4 chunks +14 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart View 21 chunks +172 lines, -94 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart View 1 13 chunks +151 lines, -13 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart View 3 chunks +44 lines, -19 lines 0 comments Download
M tests/compiler/dart2js/dart_printer_test.dart View 1 chunk +3 lines, -2 lines 0 comments Download
A + tests/language/closure_variable_shadow_test.dart View 1 1 chunk +9 lines, -5 lines 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
asgerf
6 years, 5 months ago (2014-07-02 12:55:12 UTC) #1
sigurdm
Just a few style nits. Lgtm. https://codereview.chromium.org/366853007/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/366853007/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode897 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:897: // in expression ...
6 years, 5 months ago (2014-07-02 14:29:20 UTC) #2
asgerf
https://codereview.chromium.org/366853007/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/366853007/diff/1/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart#newcode897 sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart:897: // in expression context (currently only the case for ...
6 years, 5 months ago (2014-07-02 14:35:32 UTC) #3
Kevin Millikin (Google)
OK, LGTM.
6 years, 5 months ago (2014-07-04 09:00:21 UTC) #4
asgerf
6 years, 5 months ago (2014-07-04 10:09:30 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 manually as r38005 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698