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

Issue 10855174: Lazy implementation of final variables. (Closed)

Created:
8 years, 4 months ago by floitsch
Modified:
8 years, 3 months ago
Reviewers:
ahe, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Lazy implementation of final variables. Fixes issue 3559. Depends on CL https://chromiumcodereview.appspot.com/10832351/ Committed: https://code.google.com/p/dart/source/detail?r=11870

Patch Set 1 #

Patch Set 2 : Typo and non-saved file. #

Patch Set 3 : Minor change. #

Patch Set 4 : Fix tests. #

Total comments: 26

Patch Set 5 : Addressed comments and updated tests. #

Patch Set 6 : rebase wrt CL 10832351. #

Total comments: 20

Patch Set 7 : Rebased. #

Patch Set 8 : Fix exception semantics. #

Patch Set 9 : Remove lazy bailout initializers. #

Total comments: 28

Patch Set 10 : Address comments and move some code from compiler to backend. #

Total comments: 4

Patch Set 11 : Update comments. #

Patch Set 12 : Rebase and merge. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+596 lines, -168 lines) Patch
M lib/compiler/implementation/compile_time_constants.dart View 1 2 3 4 5 6 7 8 9 10 11 18 chunks +140 lines, -44 lines 0 comments Download
M lib/compiler/implementation/compiler.dart View 1 2 3 4 5 6 7 8 9 10 2 chunks +16 lines, -5 lines 0 comments Download
M lib/compiler/implementation/js_backend/backend.dart View 1 2 3 4 5 6 7 8 9 3 chunks +19 lines, -3 lines 0 comments Download
M lib/compiler/implementation/js_backend/emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +100 lines, -18 lines 0 comments Download
M lib/compiler/implementation/lib/errors.dart View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M lib/compiler/implementation/namer.dart View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +77 lines, -52 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +32 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/nodes.dart View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +20 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/optimize.dart View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/tracer.dart View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -6 lines 0 comments Download
M tests/language/compile_time_constant_test.dart View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
A + tests/language/final_syntax_test.dart View 1 2 3 4 5 6 7 8 9 3 chunks +28 lines, -28 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -4 lines 0 comments Download
A + tests/language/lazy_final2_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -5 lines 0 comments Download
A tests/language/lazy_final3_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +56 lines, -0 lines 0 comments Download
A tests/language/lazy_final_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
floitsch
Still missing tests. And there are some tests that are now failing or passing. I ...
8 years, 4 months ago (2012-08-15 14:22:35 UTC) #1
floitsch
All tests are passing now. Still missing new tests for the added functionality.
8 years, 4 months ago (2012-08-15 20:55:51 UTC) #2
kasperl
First round of comments. I still need to spend more time looking at the tests: ...
8 years, 4 months ago (2012-08-16 14:41:37 UTC) #3
floitsch
https://chromiumcodereview.appspot.com/10855174/diff/7001/lib/compiler/implementation/compile_time_constants.dart File lib/compiler/implementation/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/10855174/diff/7001/lib/compiler/implementation/compile_time_constants.dart#newcode491 lib/compiler/implementation/compile_time_constants.dart:491: /** Map from compile-time constants to their JS name.*/ ...
8 years, 4 months ago (2012-08-16 22:52:33 UTC) #4
kasperl
LGTM, but it would be nice with test for the exceptional cases where the lazy ...
8 years, 4 months ago (2012-08-17 09:30:04 UTC) #5
floitsch
PTAL, in particular the exception handling. Also added Peter to verify the cyclic-throw handling: compiler.dart:730, ...
8 years, 3 months ago (2012-09-04 17:32:21 UTC) #6
ahe
Hi Florian, Took a quick look to give you quick feedback. Not sure it's of ...
8 years, 3 months ago (2012-09-04 18:09:21 UTC) #7
kasperl
Almost done with the review -- looks pretty good so far. I'll do a pass ...
8 years, 3 months ago (2012-09-05 08:25:24 UTC) #8
kasperl
LGTM once you've addressed Peter's concerns. https://chromiumcodereview.appspot.com/10855174/diff/19001/tests/language/final_syntax_test.dart File tests/language/final_syntax_test.dart (right): https://chromiumcodereview.appspot.com/10855174/diff/19001/tests/language/final_syntax_test.dart#newcode5 tests/language/final_syntax_test.dart:5: main() { Should ...
8 years, 3 months ago (2012-09-05 08:54:53 UTC) #9
floitsch
I have removed the code from the resolver. https://chromiumcodereview.appspot.com/10855174/diff/19001/lib/compiler/implementation/compile_time_constants.dart File lib/compiler/implementation/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/10855174/diff/19001/lib/compiler/implementation/compile_time_constants.dart#newcode511 lib/compiler/implementation/compile_time_constants.dart:511: * ...
8 years, 3 months ago (2012-09-05 09:31:07 UTC) #10
ahe
Frontend changes: LGTM! https://chromiumcodereview.appspot.com/10855174/diff/20023/lib/compiler/implementation/compiler.dart File lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10855174/diff/20023/lib/compiler/implementation/compiler.dart#newcode760 lib/compiler/implementation/compiler.dart:760: /** Compiles compile-time constants. Must not ...
8 years, 3 months ago (2012-09-05 09:34:35 UTC) #11
floitsch
8 years, 3 months ago (2012-09-05 10:43:16 UTC) #12
https://chromiumcodereview.appspot.com/10855174/diff/20023/lib/compiler/imple...
File lib/compiler/implementation/compiler.dart (right):

https://chromiumcodereview.appspot.com/10855174/diff/20023/lib/compiler/imple...
lib/compiler/implementation/compiler.dart:760: /** Compiles compile-time
constants. Must not return `null`. */
On 2012/09/05 09:34:35, ahe wrote:
> [: null :]

Done.

https://chromiumcodereview.appspot.com/10855174/diff/20023/lib/compiler/imple...
lib/compiler/implementation/compiler.dart:760: /** Compiles compile-time
constants. Must not return `null`. */
On 2012/09/05 09:34:35, ahe wrote:
> What happens if element isn't a constant?
Then an error is reported. Updated comment.

Powered by Google App Engine
This is Rietveld 408576698