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

Side by Side Diff: runtime/vm/raw_object.h

Issue 1539563003: Remove unused fields in RawField from precompiled snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 861
862 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 862 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
863 RawString* name_; 863 RawString* name_;
864 RawObject* owner_; // Class or patch class or mixin class 864 RawObject* owner_; // Class or patch class or mixin class
865 // where this field is defined. 865 // where this field is defined.
866 RawAbstractType* type_; 866 RawAbstractType* type_;
867 union { 867 union {
868 RawInstance* static_value_; // Value for static fields. 868 RawInstance* static_value_; // Value for static fields.
869 RawSmi* offset_; // Offset in words for instance fields. 869 RawSmi* offset_; // Offset in words for instance fields.
870 } value_; 870 } value_;
871 RawArray* dependent_code_;
872 union { 871 union {
873 // When precompiling we need to save the static initializer function here 872 // When precompiling we need to save the static initializer function here
874 // so that code for it can be generated. 873 // so that code for it can be generated.
875 RawFunction* precompiled_; // Static initializer function - precompiling. 874 RawFunction* precompiled_; // Static initializer function - precompiling.
876 // When generating script snapshots after running the application it is 875 // When generating script snapshots after running the application it is
877 // necessary to save the initial value of static fields so that we can 876 // necessary to save the initial value of static fields so that we can
878 // restore the value back to the original initial value. 877 // restore the value back to the original initial value.
879 RawInstance* saved_value_; // Saved initial value - static fields. 878 RawInstance* saved_value_; // Saved initial value - static fields.
880 } initializer_; 879 } initializer_;
880 RawObject** to_precompiled_snapshot() {
881 return reinterpret_cast<RawObject**>(&ptr()->initializer_);
882 }
883 RawArray* dependent_code_;
881 RawSmi* guarded_list_length_; 884 RawSmi* guarded_list_length_;
882 RawObject** to() { 885 RawObject** to() {
883 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); 886 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_);
884 } 887 }
885 888
886 int32_t token_pos_; 889 int32_t token_pos_;
887 classid_t guarded_cid_; 890 classid_t guarded_cid_;
888 classid_t is_nullable_; // kNullCid if field can contain null value and 891 classid_t is_nullable_; // kNullCid if field can contain null value and
889 // any other value otherwise. 892 // any other value otherwise.
890 // Offset to the guarded length field inside an instance of class matching 893 // Offset to the guarded length field inside an instance of class matching
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2269 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2267 kTypedDataInt8ArrayViewCid + 15); 2270 kTypedDataInt8ArrayViewCid + 15);
2268 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2271 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2269 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2272 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2270 return (kNullCid - kTypedDataInt8ArrayCid); 2273 return (kNullCid - kTypedDataInt8ArrayCid);
2271 } 2274 }
2272 2275
2273 } // namespace dart 2276 } // namespace dart
2274 2277
2275 #endif // VM_RAW_OBJECT_H_ 2278 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698