Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d97dd02

Browse files
mkustermanncommit-bot@chromium.org
authored andcommitted
[vm] Remove unused Class::RemoveFunction function
Change-Id: Ia5001d04c41e3463428e3f33b50f880f0627bde1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166852 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
1 parent 1d6eac5 commit d97dd02

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

runtime/vm/object.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,20 +3038,6 @@ void Class::AddFunction(const Function& function) const {
30383038
}
30393039
}
30403040

3041-
void Class::RemoveFunction(const Function& function) const {
3042-
ASSERT(Thread::Current()->IsMutatorThread());
3043-
const Array& arr = Array::Handle(functions());
3044-
StorePointer(&raw_ptr()->functions_, Object::empty_array().raw());
3045-
StorePointer(&raw_ptr()->functions_hash_table_, Array::null());
3046-
Function& entry = Function::Handle();
3047-
for (intptr_t i = 0; i < arr.Length(); i++) {
3048-
entry ^= arr.At(i);
3049-
if (function.raw() != entry.raw()) {
3050-
AddFunction(entry);
3051-
}
3052-
}
3053-
}
3054-
30553041
FunctionPtr Class::FunctionFromIndex(intptr_t idx) const {
30563042
const Array& funcs = Array::Handle(functions());
30573043
if ((idx < 0) || (idx >= funcs.Length())) {

runtime/vm/object.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,6 @@ class Class : public Object {
12951295
ArrayPtr functions() const { return raw_ptr()->functions_; }
12961296
void SetFunctions(const Array& value) const;
12971297
void AddFunction(const Function& function) const;
1298-
void RemoveFunction(const Function& function) const;
12991298
FunctionPtr FunctionFromIndex(intptr_t idx) const;
13001299
intptr_t FindImplicitClosureFunctionIndex(const Function& needle) const;
13011300
FunctionPtr ImplicitClosureFunctionFromIndex(intptr_t idx) const;

0 commit comments

Comments
 (0)