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

Unified Diff: vm/heap_profiler.cc

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
« no previous file with comments | « no previous file | vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap_profiler.cc
===================================================================
--- vm/heap_profiler.cc (revision 10692)
+++ vm/heap_profiler.cc (working copy)
@@ -517,7 +517,7 @@
for (intptr_t i = 0; i < Smi::Value(raw_array->ptr()->length_); ++i) {
RawField* raw_field =
reinterpret_cast<RawField*>(raw_array->ptr()->data()[i]);
- if (raw_field->ptr()->is_static_) {
+ if (Field::StaticBit::decode(raw_field->ptr()->kind_bits_)) {
++num_static_fields;
} else {
++num_instance_fields;
@@ -536,7 +536,7 @@
for (intptr_t i = 0; i < Smi::Value(raw_array->ptr()->length_); ++i) {
RawField* raw_field =
reinterpret_cast<RawField*>(raw_array->ptr()->data()[i]);
- if (raw_field->ptr()->is_static_) {
+ if (Field::StaticBit::decode(raw_field->ptr()->kind_bits_)) {
ASSERT(raw_field->ptr()->name_ != String::null());
// static field name string ID
sub.WritePointer(StringId(raw_field->ptr()->name_));
@@ -554,7 +554,7 @@
for (intptr_t i = 0; i < Smi::Value(raw_array->ptr()->length_); ++i) {
RawField* raw_field =
reinterpret_cast<RawField*>(raw_array->ptr()->data()[i]);
- if (!raw_field->ptr()->is_static_) {
+ if (!Field::StaticBit::decode(raw_field->ptr()->kind_bits_)) {
ASSERT(raw_field->ptr()->name_ != String::null());
// field name string ID
sub.WritePointer(StringId(raw_field->ptr()->name_));
@@ -593,7 +593,7 @@
for (intptr_t i = 0; i < length; ++i) {
RawField* raw_field =
reinterpret_cast<RawField*>(raw_array->ptr()->data()[i]);
- if (!raw_field->ptr()->is_static_) {
+ if (!Field::StaticBit::decode(raw_field->ptr()->kind_bits_)) {
++num_instance_fields;
}
}
@@ -611,7 +611,7 @@
for (intptr_t i = 0; i < length; ++i) {
RawField* raw_field =
reinterpret_cast<RawField*>(raw_array->ptr()->data()[i]);
- if (!raw_field->ptr()->is_static_) {
+ if (!Field::StaticBit::decode(raw_field->ptr()->kind_bits_)) {
intptr_t offset =
Smi::Value(reinterpret_cast<RawSmi*>(raw_field->ptr()->value_));
RawObject* ptr = *reinterpret_cast<RawObject**>(base + offset);
« no previous file with comments | « no previous file | vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698