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

Issue 10828053: Support const modifier in fields, variables (Closed)

Created:
8 years, 4 months ago by hausner
Modified:
8 years, 4 months ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support const modifier in fields, variables Issue 3551 This change adds const as a valid keyword to declare fields and variables. The mandatory initializer has to be a compile time const expression. Static final variables still have to be initialized with compile time constant expressions. I will add non-const static finals (issue 3558) in another change. Other small changes: - allow null in some compile time constant expressions. - allow only numbers, booleans, strings and null in compile time constant string interpolation. Committed: https://code.google.com/p/dart/source/detail?r=9992

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -97 lines) Patch
M runtime/vm/ast.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M runtime/vm/object.h View 3 chunks +5 lines, -3 lines 0 comments Download
M runtime/vm/object.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M runtime/vm/object_test.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/parser.h View 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/vm/parser.cc View 1 19 chunks +97 lines, -44 lines 0 comments Download
M runtime/vm/raw_object.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 4 chunks +4 lines, -19 lines 0 comments Download
D tests/language/const_syntax_test.dart View 1 chunk +0 lines, -18 lines 0 comments Download
M tests/language/language.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
hausner
Constantly making Dart better :)
8 years, 4 months ago (2012-07-27 18:20:43 UTC) #1
siva
8 years, 4 months ago (2012-07-27 20:32:37 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698