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

Unified Diff: runtime/vm/raw_object.h

Issue 1289643005: Rename accessors of class Field to make it more apparent as to what is being accessed - static fiel… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years, 4 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
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 16d57284871cec4a6bc3366d10f5fd9b85fc02cd..3a25a96c3157f6a2adf95031eac9111137ca5ebd 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -829,9 +829,17 @@ class RawField : public RawObject {
RawObject* owner_; // Class or patch class or mixin class
// where this field is defined.
RawAbstractType* type_;
- RawInstance* value_; // Offset in words for instance and value for static.
+ union {
hausner 2015/09/01 16:02:02 Seems a bit over the top to me: field->value_.sta
siva 2015/09/03 23:32:10 My main motivation for doing this was to have a wa
+ RawInstance* static_value_; // Value for static fields.
+ RawSmi* offset_; // Offset in words for instance fields.
+ RawObject* value_; // Used to access the value in a type agnostic way.
+ } value_;
RawArray* dependent_code_;
- RawFunction* initializer_;
+ union {
+ RawFunction* precompiled_initializer_; // Used when precompiling code.
+ RawInstance* saved_initial_value_; // Saved initial value (static fields).
hausner 2015/09/01 16:02:02 The comment just repeats what the identifier alrea
siva 2015/09/03 23:32:09 Done.
+ RawObject* value_; // Used to access the value in a type agnostic way.
+ } initializer_;
RawSmi* guarded_list_length_;
RawObject** to() {
return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);

Powered by Google App Engine
This is Rietveld 408576698