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

Issue 22909056: Support general expressions as keys in literal maps. (Closed)

Created:
7 years, 3 months ago by Johnni Winther
Modified:
7 years, 3 months ago
Reviewers:
karlklose, ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support general expressions as keys in literal maps. R=ngeoffray@google.com Committed: https://code.google.com/p/dart/source/detail?r=27622

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 27

Patch Set 4 : Updated cf. comments #

Total comments: 11

Patch Set 5 : Updated cf. comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -101 lines) Patch
M sdk/lib/_internal/compiler/implementation/compile_time_constants.dart View 1 2 3 1 chunk +25 lines, -18 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/constants.dart View 1 2 3 2 chunks +16 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 3 1 chunk +10 lines, -7 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart View 1 2 3 3 chunks +26 lines, -13 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/scanner/listener.dart View 1 1 chunk +0 lines, -3 lines 0 comments Download
M sdk/lib/_internal/lib/constant_map.dart View 1 2 3 4 1 chunk +74 lines, -30 lines 0 comments Download
M sdk/lib/_internal/lib/js_helper.dart View 1 2 3 4 1 chunk +25 lines, -7 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 2 3 3 chunks +1 line, -8 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A tests/language/map_literal10_test.dart View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
A tests/language/map_literal11_test.dart View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
A tests/language/map_literal5_test.dart View 1 chunk +44 lines, -0 lines 0 comments Download
A tests/language/map_literal6_test.dart View 1 chunk +35 lines, -0 lines 0 comments Download
A tests/language/map_literal7_test.dart View 1 1 chunk +23 lines, -0 lines 0 comments Download
A tests/language/map_literal8_test.dart View 1 1 chunk +44 lines, -0 lines 0 comments Download
A tests/language/map_literal9_test.dart View 1 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Johnni Winther
7 years, 3 months ago (2013-09-11 12:35:25 UTC) #1
ngeoffray
https://codereview.chromium.org/22909056/diff/6001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart File sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (right): https://codereview.chromium.org/22909056/diff/6001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart#newcode399 sdk/lib/_internal/compiler/implementation/compile_time_constants.dart:399: bool hasNonStringKey = false; Negating names are confusing. How ...
7 years, 3 months ago (2013-09-13 07:30:14 UTC) #2
Johnni Winther
https://codereview.chromium.org/22909056/diff/6001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart File sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (right): https://codereview.chromium.org/22909056/diff/6001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart#newcode399 sdk/lib/_internal/compiler/implementation/compile_time_constants.dart:399: bool hasNonStringKey = false; On 2013/09/13 07:30:15, ngeoffray wrote: ...
7 years, 3 months ago (2013-09-18 12:37:21 UTC) #3
ngeoffray
LGTM with comments. https://codereview.chromium.org/22909056/diff/6001/tests/language/map_literal6_test.dart File tests/language/map_literal6_test.dart (right): https://codereview.chromium.org/22909056/diff/6001/tests/language/map_literal6_test.dart#newcode12 tests/language/map_literal6_test.dart:12: const A(); On 2013/09/18 12:37:21, Johnni ...
7 years, 3 months ago (2013-09-18 14:32:08 UTC) #4
Johnni Winther
https://codereview.chromium.org/22909056/diff/14001/sdk/lib/_internal/compiler/implementation/constants.dart File sdk/lib/_internal/compiler/implementation/constants.dart (right): https://codereview.chromium.org/22909056/diff/14001/sdk/lib/_internal/compiler/implementation/constants.dart#newcode430 sdk/lib/_internal/compiler/implementation/constants.dart:430: // for the keys. On 2013/09/18 14:32:08, ngeoffray wrote: ...
7 years, 3 months ago (2013-09-18 14:53:47 UTC) #5
Johnni Winther
Committed patchset #5 manually as r27622 (presubmit successful).
7 years, 3 months ago (2013-09-18 15:00:26 UTC) #6
ngeoffray
7 years, 3 months ago (2013-09-18 15:04:56 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/22909056/diff/14001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/constants.dart (right):

https://codereview.chromium.org/22909056/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/constants.dart:430: // for the keys.
On 2013/09/18 14:53:47, Johnni Winther wrote:
> On 2013/09/18 14:32:08, ngeoffray wrote:
> > I don't understand what is be the difference with onlyStringKeys then. It's
> fine
> > for onlyStringKeys to generate an unused list constant?
> > 
> > I though that keys would be the jsData.
> 
> For [:!onlyStringKeys:] jsData is the key-value pairs list generated in the
> ConstantEmitter passed to [GeneralConstantMap]. In the case of
[onlyStringKeys]
> the [keys] list is provided as argument to [ConstantStringMap] in addition to
> the key-value pairs list.

OK, please add that as a comment.

Powered by Google App Engine
This is Rietveld 408576698