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

Unified Diff: src/heap-inl.h

Issue 3089005: [Isolates] Add a pointer to Heap to a meta map. (Closed)
Patch Set: review feedback Created 10 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 | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 23967bb82ddb287fa904f5b1f27c5e2216ed6f9f..a300b714de5b843eaa33804ead17c740fac118e3 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -381,6 +381,10 @@ void Heap::SetLastScriptId(Object* last_script_id) {
roots_[kLastScriptIdRootIndex] = last_script_id;
}
+Isolate* Heap::isolate() {
+ return reinterpret_cast<Isolate*>(reinterpret_cast<intptr_t>(this) -
+ reinterpret_cast<size_t>(reinterpret_cast<Isolate*>(4)->heap()) + 4);
+}
#define GC_GREEDY_CHECK() \
ASSERT(!FLAG_gc_greedy || HEAP->GarbageCollectionGreedyCheck())
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698