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

Unified Diff: runtime/vm/thread.h

Issue 1401413002: Move no_callback_scope_depth_ and cha_ from isolate -> thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Spelling fix Created 5 years, 2 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/object.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index a27e6730bcece9856c492c647a6acdaf7d49b6bd..210fef1c39a8066dcb9be951fad9981cbf2923f1 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -166,11 +166,24 @@ class Thread {
return OFFSET_OF(Thread, isolate_);
}
- // The (topmost) CHA for the compilation in the isolate of this thread.
- // TODO(23153): Move this out of Isolate/Thread.
+ // The (topmost) CHA for the compilation in this thread.
CHA* cha() const;
void set_cha(CHA* value);
+ int32_t no_callback_scope_depth() const {
+ return no_callback_scope_depth_;
+ }
+
+ void IncrementNoCallbackScopeDepth() {
+ ASSERT(no_callback_scope_depth_ < INT_MAX);
+ no_callback_scope_depth_ += 1;
+ }
+
+ void DecrementNoCallbackScopeDepth() {
+ ASSERT(no_callback_scope_depth_ > 0);
+ no_callback_scope_depth_ -= 1;
+ }
+
void StoreBufferAddObject(RawObject* obj);
void StoreBufferAddObjectGC(RawObject* obj);
#if defined(TESTING)
@@ -445,6 +458,9 @@ LEAF_RUNTIME_ENTRY_LIST(DECLARE_MEMBERS)
VMHandles reusable_handles_;
+ CHA* cha_;
+ int32_t no_callback_scope_depth_;
+
// All |Thread|s are registered in the thread list.
Thread* thread_list_next_;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698