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

Unified Diff: runtime/vm/object.h

Issue 10828053: Support const modifier in fields, variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 9982)
+++ runtime/vm/object.h (working copy)
@@ -1654,9 +1654,7 @@
RawString* name() const { return raw_ptr()->name_; }
bool is_static() const { return raw_ptr()->is_static_; }
bool is_final() const { return raw_ptr()->is_final_; }
- // TODO(regis): Implement support for const fields. Until then, current final
- // fields are considered const.
- bool is_const() const { return raw_ptr()->is_final_; }
+ bool is_const() const { return raw_ptr()->is_const_; }
inline intptr_t Offset() const;
inline void SetOffset(intptr_t value) const;
@@ -1679,6 +1677,7 @@
static RawField* New(const String& name,
bool is_static,
bool is_final,
+ bool is_const,
intptr_t token_pos);
static intptr_t value_offset() { return OFFSET_OF(RawField, value_); }
@@ -1708,6 +1707,9 @@
void set_is_final(bool is_final) const {
raw_ptr()->is_final_ = is_final;
}
+ void set_is_const(bool value) const {
+ raw_ptr()->is_const_ = value;
+ }
void set_token_pos(intptr_t token_pos) const {
raw_ptr()->token_pos_ = token_pos;
}
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698