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

Issue 9427012: Allow binary operators on compile-time-constants. (Closed)

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

Description

Allow binary operators on compile-time-constants. Committed: https://code.google.com/p/dart/source/detail?r=4455

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address comments. #

Patch Set 3 : Update status files. #

Patch Set 4 : Update status file.wq #

Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -168 lines) Patch
M frog/leg/compile_time_constants.dart View 1 3 chunks +87 lines, -10 lines 0 comments Download
M frog/leg/compiler.dart View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M frog/leg/ssa/nodes.dart View 1 2 3 1 chunk +0 lines, -54 lines 0 comments Download
M frog/leg/tree/nodes.dart View 1 2 2 chunks +67 lines, -3 lines 0 comments Download
M frog/leg/warnings.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
A frog/tests/leg_only/src/CompileTimeConstant4Test.dart View 1 1 chunk +43 lines, -0 lines 0 comments Download
M tests/co19/co19-leg.status View 1 2 3 7 chunks +1 line, -93 lines 0 comments Download
M tests/corelib/corelib-leg.status View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language.status View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M tests/language/language-leg.status View 1 2 3 3 chunks +0 lines, -4 lines 0 comments Download
A tests/language/src/CompileTimeConstant2Test.dart View 1 1 chunk +55 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstant3Test.dart View 1 1 chunk +43 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstant5Test.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstant6Test.dart View 1 1 chunk +31 lines, -0 lines 0 comments Download
A tests/language/src/CompileTimeConstantTest.dart View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
8 years, 10 months ago (2012-02-20 14:23:27 UTC) #1
ngeoffray
LGTM, if you move all tests to language (I think we should ban leg_only from ...
8 years, 10 months ago (2012-02-21 11:22:09 UTC) #2
floitsch
8 years, 10 months ago (2012-02-22 10:17:51 UTC) #3
https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
File frog/leg/compile_time_constants.dart (right):

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
frog/leg/compile_time_constants.dart:230: default: error(send);
On 2012/02/21 11:22:09, ngeoffray wrote:
> new line after default?

Done.

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
frog/leg/compile_time_constants.dart:243: // We use == instead of === so that
non-canonicalized DartStrings can
On 2012/02/21 11:22:09, ngeoffray wrote:
> Remove comment, or adjust it to !=.

Done.

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
frog/leg/compile_time_constants.dart:285: return new ConsDartString(dartString,
right);
On 2012/02/21 11:22:09, ngeoffray wrote:
> Could we have operator+ defined in DartString? (likely to get removed, I know
> :))

let's keep it without +.

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
frog/leg/compile_time_constants.dart:289: return new ConsDartString(left,
On 2012/02/21 11:22:09, ngeoffray wrote:
> Please move ConsDartString from ssa nodes to ast nodes. Even better if you
move
> it to util.

Done.

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/compile_time_c...
frog/leg/compile_time_constants.dart:294: } else if (op == "[]" && right is int)
{
On 2012/02/21 11:22:09, ngeoffray wrote:
> Is "op == '[]'" equivalent to send.isIndex?

Done.

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/tree/nodes.dart
File frog/leg/tree/nodes.dart (right):

https://chromiumcodereview.appspot.com/9427012/diff/1/frog/leg/tree/nodes.dar...
frog/leg/tree/nodes.dart:714: assert(it2.hasNext());
On 2012/02/21 11:22:09, ngeoffray wrote:
> I find this assert and the one line 717 too much.

Done.

Powered by Google App Engine
This is Rietveld 408576698