Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 9229d81de8a19b867baa2a289cfda45c3b02f751..da6a1617ac828e1701e04e844e67dc465ef4f5c6 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -8,7 +8,9 @@ |
#include "include/dart_native_api.h" |
#include "platform/assert.h" |
#include "platform/json.h" |
+#include "vm/class_finalizer.h" |
#include "vm/code_observers.h" |
+#include "vm/compiler.h" |
#include "vm/compiler_stats.h" |
#include "vm/coverage.h" |
#include "vm/dart_api_message.h" |
@@ -24,7 +26,6 @@ |
#include "vm/object_store.h" |
#include "vm/object.h" |
#include "vm/os_thread.h" |
-#include "vm/parser.h" |
#include "vm/port.h" |
#include "vm/profiler.h" |
#include "vm/reusable_handles.h" |
@@ -746,6 +747,7 @@ Isolate::Isolate(const Dart_IsolateFlags& api_flags) |
gc_epilogue_callback_(NULL), |
defer_finalization_count_(0), |
deopt_context_(NULL), |
+ compile_optimized_task_(NULL), |
compiler_stats_(NULL), |
is_service_isolate_(false), |
stacktrace_(NULL), |
@@ -760,6 +762,7 @@ Isolate::Isolate(const Dart_IsolateFlags& api_flags) |
default_tag_(UserTag::null()), |
collected_closures_(GrowableObjectArray::null()), |
deoptimized_code_array_(GrowableObjectArray::null()), |
+ background_compilation_queue_(GrowableObjectArray::null()), |
pending_service_extension_calls_(GrowableObjectArray::null()), |
registered_service_extension_handlers_(GrowableObjectArray::null()), |
metrics_list_head_(NULL), |
@@ -1691,6 +1694,8 @@ void Isolate::Shutdown() { |
} |
#endif |
+ CompileOptimizedTask::Stop(compile_optimized_task_); |
+ |
// TODO(5411455): For now just make sure there are no current isolates |
// as we are shutting down the isolate. |
Thread::ExitIsolate(); |
@@ -1766,6 +1771,9 @@ void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor, |
// Visit array of closures pending precompilation. |
visitor->VisitPointer(reinterpret_cast<RawObject**>(&collected_closures_)); |
+ visitor->VisitPointer(reinterpret_cast<RawObject**>( |
+ &background_compilation_queue_)); |
+ |
// Visit the deoptimized code array which is stored in the isolate. |
visitor->VisitPointer( |
reinterpret_cast<RawObject**>(&deoptimized_code_array_)); |
@@ -1985,6 +1993,12 @@ void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) { |
} |
+void Isolate::set_background_compilation_queue( |
+ const GrowableObjectArray& value) { |
+ background_compilation_queue_ = value.raw(); |
+} |
+ |
+ |
void Isolate::TrackDeoptimizedCode(const Code& code) { |
ASSERT(!code.IsNull()); |
const GrowableObjectArray& deoptimized_code = |