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

Unified Diff: runtime/vm/thread.h

Issue 1016973002: Move CHA state keeping from Isolate to Thread. (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/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.h
===================================================================
--- runtime/vm/thread.h (revision 44544)
+++ runtime/vm/thread.h (working copy)
@@ -10,7 +10,7 @@
namespace dart {
// A VM thread; may be executing Dart code or performing helper tasks like
-// garbage collection.
+// garbage collection or compilation.
class Thread {
public:
static Thread* Current() {
@@ -17,7 +17,7 @@
// For now, there is still just one thread per isolate, and the Thread
// class just aliases the Isolate*. Once all interfaces and uses have been
// updated to distinguish between isolates and threads, Thread will get its
- // own thread-local storage key.
+ // own thread-local storage key and fields.
return reinterpret_cast<Thread*>(Isolate::Current());
}
// TODO(koda): Remove after pivoting to Thread* in native/runtime entries.
@@ -32,8 +32,9 @@
}
// The isolate that this thread is operating on.
- Isolate* isolate() {
- return reinterpret_cast<Isolate*>(this);
+ Isolate* isolate() { return reinterpret_cast<Isolate*>(this); }
+ const Isolate* isolate() const {
+ return reinterpret_cast<const Isolate*>(this);
}
// The log for this thread.
@@ -41,6 +42,10 @@
return reinterpret_cast<Isolate*>(this)->Log();
}
+ // The (topmost) CHA for the compilation in this thread.
+ CHA* cha() const { return isolate()->cha(); }
+ void set_cha(CHA* value) { isolate()->set_cha(value); }
+
private:
DISALLOW_COPY_AND_ASSIGN(Thread);
};
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698