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

Unified Diff: runtime/vm/compiler.cc

Issue 1393373003: Remove isolate argument from handle allocation: Part I (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanups 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/code_generator.cc ('k') | runtime/vm/compiler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 666a47b2739cbf04310e8b40bf2bac9009ef8dc6..f93657b97e142cbb93972840fa2ca69f4d15782c 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -215,10 +215,10 @@ static void AddRelatedClassesToList(
const Class& cls,
GrowableHandlePtrArray<const Class>* parse_list,
GrowableHandlePtrArray<const Class>* patch_list) {
- Isolate* isolate = Isolate::Current();
- Class& parse_class = Class::Handle(isolate);
- AbstractType& interface_type = Type::Handle(isolate);
- Array& interfaces = Array::Handle(isolate);
+ Zone* zone = Thread::Current()->zone();
+ Class& parse_class = Class::Handle(zone);
+ AbstractType& interface_type = Type::Handle(zone);
+ Array& interfaces = Array::Handle(zone);
// Add all the interfaces implemented by the class that have not been
// already parsed to the parse list. Mark the interface as parsed so that
@@ -281,8 +281,9 @@ RawError* Compiler::CompileClass(const Class& cls) {
ClassFinalizer::FinalizeClass(cls);
return Error::null();
} else {
- Isolate* isolate = Isolate::Current();
- Error& error = Error::Handle(isolate);
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ Error& error = Error::Handle(thread->zone());
error = isolate->object_store()->sticky_error();
isolate->object_store()->clear_sticky_error();
return error.raw();
@@ -365,7 +366,7 @@ RawError* Compiler::CompileClass(const Class& cls) {
parse_class.reset_is_marked_for_parsing();
}
}
- Error& error = Error::Handle(isolate);
+ Error& error = Error::Handle(zone.GetZone());
error = isolate->object_store()->sticky_error();
isolate->object_store()->clear_sticky_error();
return error.raw();
@@ -1552,8 +1553,8 @@ void BackgroundCompiler::EnsureInit(Isolate* isolate) {
if (isolate->background_compiler() == NULL) {
BackgroundCompiler* task = new BackgroundCompiler(isolate);
isolate->set_background_compiler(task);
- isolate->set_background_compilation_queue(
- GrowableObjectArray::Handle(isolate, GrowableObjectArray::New()));
+ isolate->set_background_compilation_queue(GrowableObjectArray::Handle(
+ isolate->current_zone(), GrowableObjectArray::New()));
start_task = true;
}
}
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/compiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698