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

Unified Diff: vm/raw_object.h

Issue 10837247: use bit fields for class state and field type values. This shrinks the snapshot (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« vm/object.h ('K') | « vm/object.cc ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.h
===================================================================
--- vm/raw_object.h (revision 10677)
+++ vm/raw_object.h (working copy)
@@ -407,9 +407,7 @@
intptr_t next_field_offset_; // Offset of the next instance field.
intptr_t num_native_fields_; // Number of native fields in class.
intptr_t token_pos_;
- int8_t class_state_; // Of type ClassState.
- bool is_const_;
- bool is_interface_;
+ uint8_t state_bits_; // state, is_const, is_interface.
cshapiro 2012/08/14 22:05:13 Any reason not to make this and the related field
siva 2012/08/14 22:40:18 True, but it documents the size requirement of the
friend class Object;
friend class RawInstance;
@@ -611,10 +609,7 @@
RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->value_); }
intptr_t token_pos_;
- bool is_static_;
- bool is_final_;
- bool is_const_;
- bool has_initializer_;
+ uint8_t kind_bits_; // static, final, const, has initializer.
};
« vm/object.h ('K') | « vm/object.cc ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698