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

Unified Diff: runtime/vm/raw_object.h

Issue 1024063003: Eliminate fake-Isolate workaround from concurrent sweeper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/pages.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 44565)
+++ runtime/vm/raw_object.h (working copy)
@@ -395,6 +395,7 @@
return ((GetClassId() == kFreeListElement));
}
+ // Uses the class table of the current isolate, when needed.
intptr_t Size() const {
uword tags = ptr()->tags_;
intptr_t result = SizeTag::decode(tags);
@@ -407,6 +408,19 @@
return result;
}
+ // Like above, but avoids Thread/Isolate::Current.
+ intptr_t Size(const ClassTable* class_table) const {
+ uword tags = ptr()->tags_;
+ intptr_t result = SizeTag::decode(tags);
+ if (result != 0) {
+ ASSERT(result == SizeFromClass(class_table));
+ return result;
+ }
+ result = SizeFromClass(class_table);
+ ASSERT(result > SizeTag::kMaxSizeTag);
+ return result;
+ }
+
bool Contains(uword addr) const {
intptr_t this_size = Size();
uword this_addr = RawObject::ToAddr(this);
@@ -477,6 +491,7 @@
}
intptr_t SizeFromClass() const;
+ intptr_t SizeFromClass(const ClassTable* class_table) const;
intptr_t GetClassId() const {
uword tags = ptr()->tags_;
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698