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

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: add-comment Created 5 years, 3 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/precompiler.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 0c4fcf60d38b14a7780e4870968ed158c44335da..bacbfe82f274c3c6a75c35a24193d29ad6a0dc1d 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -830,9 +830,20 @@ 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 {
+ RawInstance* static_value_; // Value for static fields.
+ RawSmi* offset_; // Offset in words for instance fields.
+ } value_;
RawArray* dependent_code_;
- RawFunction* initializer_;
+ union {
+ // When precompiling we need to save the static initializer function here
+ // so that code for it can be generated.
+ RawFunction* precompiled_; // Static initializer function - precompiling.
+ // When generating script snapshots after running the application it is
+ // necessary to save the initial value of static fields so that we can
+ // restore the value back to the original initial value.
+ RawInstance* saved_value_; // Saved initial value - static fields.
+ } initializer_;
RawSmi* guarded_list_length_;
RawObject** to() {
return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698