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

Unified Diff: runtime/vm/isolate.h

Issue 1156593002: Cache current thread in a reserved register and use it in LoadIsolate (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 7 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 9ee689f01d678b031a17a7e634ae72dd28898dea..a7b2486befe0c70d88424377f35a3c8bed18f9f2 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -167,11 +167,15 @@ class Isolate : public BaseIsolate {
// A thread that operates on this isolate and may execute Dart code.
// No other threads operating on this isolate may execute Dart code.
- // TODO(koda): Remove after caching current thread in generated code.
+ // TODO(koda): Remove after pivoting to thread in NativeArguments.
Thread* mutator_thread() {
DEBUG_ASSERT(mutator_thread_ == NULL || IsIsolateOf(mutator_thread_));
return mutator_thread_;
}
+ // TODO(koda): Remove after pivoting to thread in JumpToExceptionHandler.
+ static intptr_t mutator_thread_offset() {
+ return OFFSET_OF(Isolate, mutator_thread_);
+ }
#if defined(DEBUG)
bool IsIsolateOf(Thread* thread);
#endif // DEBUG

Powered by Google App Engine
This is Rietveld 408576698