| 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);
|
| };
|
|
|