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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 1384403002: Preparation for moving reusable handles to thread and more cleanups: isolate -> thread based handle… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/vm/intrinsifier.cc
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index 76e9b63e3837d2e84946d741a7591e7ede01bdb0..8d0ade22091e348503d528126dc35a6ca0246898 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -36,12 +36,13 @@ bool Intrinsifier::CanIntrinsify(const Function& function) {
#if defined(DART_NO_SNAPSHOT)
void Intrinsifier::InitializeState() {
- Isolate* isolate = Isolate::Current();
- Library& lib = Library::Handle(isolate);
- Class& cls = Class::Handle(isolate);
- Function& func = Function::Handle(isolate);
- String& str = String::Handle(isolate);
- Error& error = Error::Handle(isolate);
+ Thread* thread = Thread::Current();
+ Zone* zone = thread->zone();
+ Library& lib = Library::Handle(zone);
+ Class& cls = Class::Handle(zone);
+ Function& func = Function::Handle(zone);
+ String& str = String::Handle(zone);
+ Error& error = Error::Handle(zone);
#define SETUP_FUNCTION(class_name, function_name, destination, fp) \
if (strcmp(#class_name, "::") == 0) { \
@@ -51,7 +52,7 @@ void Intrinsifier::InitializeState() {
str = String::New(#class_name); \
cls = lib.LookupClassAllowPrivate(str); \
ASSERT(!cls.IsNull()); \
- error = cls.EnsureIsFinalized(isolate); \
+ error = cls.EnsureIsFinalized(thread); \
if (!error.IsNull()) { \
OS::PrintErr("%s\n", error.ToErrorCString()); \
} \
« runtime/vm/gc_marker.h ('K') | « runtime/vm/gc_marker.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698