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

Issue 9665001: Implement constant maps. (Closed)

Created:
8 years, 9 months ago by floitsch
Modified:
8 years, 9 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement constant maps. Committed: https://code.google.com/p/dart/source/detail?r=5289

Patch Set 1 #

Patch Set 2 : Cosmetic changes. #

Total comments: 8

Patch Set 3 : Address comments, add tests and more bailouts. #

Patch Set 4 : cosmetic change. #

Total comments: 10

Patch Set 5 : Replace addDependencies with getDependencies. #

Patch Set 6 : Cosmetic change. #

Total comments: 4

Patch Set 7 : Address comments. #

Patch Set 8 : Remove trailing whitespace. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+453 lines, -9 lines) Patch
M frog/leg/compile_time_constants.dart View 1 2 3 4 5 6 9 chunks +165 lines, -5 lines 0 comments Download
A frog/leg/lib/constant_map.dart View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 0 comments Download
M frog/leg/lib/js_helper.dart View 2 chunks +9 lines, -0 lines 0 comments Download
M frog/leg/tree/nodes.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M frog/leg/warnings.dart View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M tests/co19/co19-leg.status View 1 2 3 4 5 6 7 3 chunks +1 line, -3 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M tests/language/language-leg.status View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstantATest.dart View 1 2 1 chunk +126 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstantBTest.dart View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstantCTest.dart View 1 2 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
floitsch
I still have to write some tests and update the status files. (Apparently there are ...
8 years, 9 months ago (2012-03-09 14:11:08 UTC) #1
ngeoffray
LGTM! https://chromiumcodereview.appspot.com/9665001/diff/2001/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/9665001/diff/2001/frog/leg/compile_time_constants.dart#newcode335 frog/leg/compile_time_constants.dart:335: // class element. Please also say that it's ...
8 years, 9 months ago (2012-03-09 18:08:50 UTC) #2
floitsch
PTAL. https://chromiumcodereview.appspot.com/9665001/diff/2001/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/9665001/diff/2001/frog/leg/compile_time_constants.dart#newcode335 frog/leg/compile_time_constants.dart:335: // class element. On 2012/03/09 18:08:50, ngeoffray wrote: ...
8 years, 9 months ago (2012-03-10 17:40:24 UTC) #3
ngeoffray
LGTM, but please consider adding an abstraction for the dependencies. https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart#newcode26 ...
8 years, 9 months ago (2012-03-10 18:33:55 UTC) #4
floitsch
PTA (hopefully final) L. :) https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart#newcode26 frog/leg/compile_time_constants.dart:26: * already in the ...
8 years, 9 months ago (2012-03-10 19:58:54 UTC) #5
ngeoffray
STV! https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_time_constants.dart#newcode770 frog/leg/compile_time_constants.dart:770: entry.key.asStringInterpolation() === null)) { On 2012/03/10 19:58:54, floitsch ...
8 years, 9 months ago (2012-03-10 22:28:03 UTC) #6
floitsch
8 years, 9 months ago (2012-03-10 22:58:22 UTC) #7
https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_tim...
File frog/leg/compile_time_constants.dart (right):

https://chromiumcodereview.appspot.com/9665001/diff/5011/frog/leg/compile_tim...
frog/leg/compile_time_constants.dart:770: entry.key.asStringInterpolation() ===
null)) {
On 2012/03/10 22:28:03, ngeoffray wrote:
> On 2012/03/10 19:58:54, floitsch wrote:
> > On 2012/03/10 18:33:55, ngeoffray wrote:
> > > AFAIK, string interpolation for constants is still not in the spec.
> > 
> > This is in preparation for future changes.
> > Since string-interpolation is not a compile-time constant the key will
return
> as
> > 'null'.
> > In some sense the check is currently dead code. If you want I can remove it
> for
> > now.
> 
> I'd prefer that you remove it. I have a strong aversion against dead code.

Done.

https://chromiumcodereview.appspot.com/9665001/diff/5014/tests/co19/co19-leg....
File tests/co19/co19-leg.status (right):

https://chromiumcodereview.appspot.com/9665001/diff/5014/tests/co19/co19-leg....
tests/co19/co19-leg.status:210: Language/10_Expressions/01_Constants_A15_t03:
Fail # 'const' keyword is not verified in literal maps.
On 2012/03/10 22:28:03, ngeoffray wrote:
> This can be a Fail, OK for Q1 because dartc will check it (there is a list of
> Fail, OK in the file).

Done.

https://chromiumcodereview.appspot.com/9665001/diff/5014/tests/language/langu...
File tests/language/language-leg.status (right):

https://chromiumcodereview.appspot.com/9665001/diff/5014/tests/language/langu...
tests/language/language-leg.status:31: ConstOptionalArgsNegativeTest: Fail #
'const' keyword is not verified in literal maps.
On 2012/03/10 22:28:03, ngeoffray wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698