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

Issue 11273121: Support closures inside initializers. (Closed)

Created:
8 years, 1 month ago by ngeoffray
Modified:
8 years, 1 month ago
Reviewers:
ahe, floitsch, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support closures inside initializers. Committed: https://code.google.com/p/dart/source/detail?r=14333

Patch Set 1 : #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -24 lines) Patch
M lib/compiler/implementation/closure.dart View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 3 7 chunks +29 lines, -10 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 3 1 chunk +5 lines, -0 lines 1 comment Download
A tests/language/closure_in_initializer2_test.dart View 1 1 chunk +21 lines, -0 lines 2 comments Download
A tests/language/closure_in_initializer_test.dart View 1 chunk +42 lines, -0 lines 1 comment Download
M tests/language/constructor6_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/language/function_syntax_test.dart View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 3 chunks +0 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ngeoffray
http://codereview.chromium.org/11273121/diff/4001/tests/language/language.status File tests/language/language.status (right): http://codereview.chromium.org/11273121/diff/4001/tests/language/language.status#newcode33 tests/language/language.status:33: closure_in_initializer_test: Fail # (Discussion ongoing) Kasper, is there still ...
8 years, 1 month ago (2012-10-30 18:32:21 UTC) #1
kasperl
http://codereview.chromium.org/11273121/diff/4001/tests/language/language.status File tests/language/language.status (right): http://codereview.chromium.org/11273121/diff/4001/tests/language/language.status#newcode33 tests/language/language.status:33: closure_in_initializer_test: Fail # (Discussion ongoing) On 2012/10/30 18:32:21, ngeoffray ...
8 years, 1 month ago (2012-10-31 08:15:01 UTC) #2
kasperl
Could you add a small sample of the generated code for a simple case where ...
8 years, 1 month ago (2012-10-31 08:25:46 UTC) #3
ngeoffray
For this Dart code: class A { var f; A(a) : f = (() => ...
8 years, 1 month ago (2012-10-31 09:00:22 UTC) #4
ngeoffray
http://codereview.chromium.org/11273121/diff/4001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): http://codereview.chromium.org/11273121/diff/4001/lib/compiler/implementation/ssa/builder.dart#newcode338 lib/compiler/implementation/ssa/builder.dart:338: // Create a box. On 2012/10/31 08:25:46, kasperl wrote: ...
8 years, 1 month ago (2012-10-31 09:04:28 UTC) #5
kasperl
LGTM. Maybe file a low-priority optimization opportunity bug for the harmless, but silly assignment?
8 years, 1 month ago (2012-10-31 09:34:28 UTC) #6
ngeoffray
Thanks Kasper: http://code.google.com/p/dart/issues/detail?id=6421
8 years, 1 month ago (2012-10-31 09:38:59 UTC) #7
floitsch
LGTM. http://codereview.chromium.org/11273121/diff/4001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): http://codereview.chromium.org/11273121/diff/4001/lib/compiler/implementation/ssa/builder.dart#newcode339 lib/compiler/implementation/ssa/builder.dart:339: // TODO(floitsch): Clean up this hack. Should we ...
8 years, 1 month ago (2012-10-31 10:14:50 UTC) #8
ngeoffray
I also updated function_syntax_test which was using the bitnot operator and dart and dart2js give ...
8 years, 1 month ago (2012-10-31 11:28:39 UTC) #9
kasperl
Still LGTM.
8 years, 1 month ago (2012-10-31 11:29:44 UTC) #10
ahe
8 years, 1 month ago (2012-11-06 15:14:22 UTC) #11
LGTM

http://codereview.chromium.org/11273121/diff/14002/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/codegen.dart (right):

http://codereview.chromium.org/11273121/diff/14002/lib/compiler/implementatio...
lib/compiler/implementation/ssa/codegen.dart:162: // Put the box parameter.
What does this comment mean?

http://codereview.chromium.org/11273121/diff/14002/tests/language/closure_in_...
File tests/language/closure_in_initializer2_test.dart (right):

http://codereview.chromium.org/11273121/diff/14002/tests/language/closure_in_...
tests/language/closure_in_initializer2_test.dart:4: 
What does this test do?

http://codereview.chromium.org/11273121/diff/14002/tests/language/closure_in_...
tests/language/closure_in_initializer2_test.dart:7: Expect.equals(2, this.f());
This is a static warning. Consider adding an abstract getter.

http://codereview.chromium.org/11273121/diff/14002/tests/language/closure_in_...
File tests/language/closure_in_initializer_test.dart (right):

http://codereview.chromium.org/11273121/diff/14002/tests/language/closure_in_...
tests/language/closure_in_initializer_test.dart:4: 
What does this test do?

Powered by Google App Engine
This is Rietveld 408576698