From 9854a0421046b2270c90b8d1362403a71d36bdbc Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Wed, 22 Sep 2021 17:16:36 +0000 Subject: [PATCH] [vm] Remove dead Thread::pending_functions_. Cf. c9f5c3a79e6a4534b23a0c6e165b763b71890dcb. TEST=build Change-Id: I9edff8afaf277b03c4dfdcdbea9ba244dde577ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213740 Reviewed-by: Siva Annamalai Commit-Queue: Ryan Macnak --- runtime/vm/isolate.cc | 1 - runtime/vm/object.cc | 1 - runtime/vm/thread.cc | 13 ------------- runtime/vm/thread.h | 4 ---- 4 files changed, 19 deletions(-) diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index 7e0034b73e7..0769e990330 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -650,7 +650,6 @@ void IsolateGroup::UnscheduleThreadLocked(MonitorLocker* ml, thread->set_execution_state(Thread::kThreadInNative); thread->set_safepoint_state(Thread::AtSafepointField::encode(true) | Thread::AtDeoptSafepointField::encode(true)); - thread->clear_pending_functions(); ASSERT(thread->no_safepoint_scope_depth() == 0); if (is_mutator) { // The mutator thread structure stays alive and attached to the isolate as diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index 249c9506ee3..514f04e792a 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -1191,7 +1191,6 @@ void Object::Init(IsolateGroup* isolate_group) { // Some thread fields need to be reinitialized as null constants have not been // initialized until now. thread->ClearStickyError(); - thread->clear_pending_functions(); ASSERT(!null_object_->IsSmi()); ASSERT(!null_class_->IsSmi()); diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index 4e46bbb9697..6ca5b69560a 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -98,7 +98,6 @@ Thread::Thread(bool is_vm_isolate) stack_overflow_count_(0), hierarchy_info_(NULL), type_usage_info_(NULL), - pending_functions_(GrowableObjectArray::null()), sticky_error_(Error::null()), REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) @@ -219,17 +218,6 @@ void Thread::InitVMConstants() { #undef REUSABLE_HANDLE_ALLOCATION } -GrowableObjectArrayPtr Thread::pending_functions() { - if (pending_functions_ == GrowableObjectArray::null()) { - pending_functions_ = GrowableObjectArray::New(Heap::kOld); - } - return pending_functions_; -} - -void Thread::clear_pending_functions() { - pending_functions_ = GrowableObjectArray::null(); -} - void Thread::set_active_exception(const Object& value) { active_exception_ = value.ptr(); } @@ -613,7 +601,6 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor, // Visit objects in thread specific handles area. reusable_handles_.VisitObjectPointers(visitor); - visitor->VisitPointer(reinterpret_cast(&pending_functions_)); visitor->VisitPointer(reinterpret_cast(&global_object_pool_)); visitor->VisitPointer(reinterpret_cast(&active_exception_)); visitor->VisitPointer(reinterpret_cast(&active_stacktrace_)); diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h index 4277ee7610e..baa448d13d0 100644 --- a/runtime/vm/thread.h +++ b/runtime/vm/thread.h @@ -695,9 +695,6 @@ class Thread : public ThreadState { return OFFSET_OF(Thread, unboxed_double_runtime_arg_); } - GrowableObjectArrayPtr pending_functions(); - void clear_pending_functions(); - static intptr_t global_object_pool_offset() { return OFFSET_OF(Thread, global_object_pool_); } @@ -1127,7 +1124,6 @@ class Thread : public ThreadState { CompilerState* compiler_state_ = nullptr; HierarchyInfo* hierarchy_info_; TypeUsageInfo* type_usage_info_; - GrowableObjectArrayPtr pending_functions_; CompilerTimings* compiler_timings_ = nullptr;