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

Unified Diff: vm/object.h

Issue 8827016: Add a flags field to RawObject so that we can tag objects with certain (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/dart_api_impl_test.cc ('k') | vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 2210)
+++ vm/object.h (working copy)
@@ -151,6 +151,7 @@
inline RawClass* clazz() const;
static intptr_t class_offset() { return OFFSET_OF(RawObject, class_); }
+ static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); }
// Class testers.
#define DEFINE_CLASS_TESTER(clazz) \
@@ -1036,7 +1037,7 @@
static intptr_t InstanceSize(intptr_t len) {
// Ensure that the types_ is not adding to the object length.
- ASSERT(sizeof(RawTypeArguments) == 3 * kWordSize);
+ ASSERT(sizeof(RawTypeArguments) == (sizeof(RawObject) + (2 * kWordSize)));
return RoundedAllocationSize(sizeof(RawTypeArguments) + (len * kWordSize));
}
@@ -2942,7 +2943,8 @@
}
static intptr_t InstanceSize(intptr_t len) {
- ASSERT(sizeof(RawArray) == 3 * kWordSize);
+ // Ensure that variable length data is not adding to the object length.
+ ASSERT(sizeof(RawArray) == (sizeof(RawObject) + (2 * kWordSize)));
return RoundedAllocationSize(sizeof(RawArray) + (len * kWordSize));
}
« no previous file with comments | « vm/dart_api_impl_test.cc ('k') | vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698