|
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
Total comments: 7
|
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
|
Total messages: 5 (0 generated)
|