| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index d03fc573e7ba79723ed53b7d9ad334a47cd1f664..b327668c8c34afb97c8a2dc518dc47ed37b8de4b 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -2125,6 +2125,19 @@ void Class::AddFunction(const Function& function) const {
|
| }
|
|
|
|
|
| +void Class::RemoveFunction(const Function& function) const {
|
| + const Array& arr = Array::Handle(functions());
|
| + StorePointer(&raw_ptr()->functions_, Object::empty_array().raw());
|
| + Function& entry = Function::Handle();
|
| + for (intptr_t i = 0; i < arr.Length(); i++) {
|
| + entry ^= arr.At(i);
|
| + if (function.raw() != entry.raw()) {
|
| + AddFunction(entry);
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| intptr_t Class::FindFunctionIndex(const Function& needle) const {
|
| Isolate* isolate = Isolate::Current();
|
| if (EnsureIsFinalized(isolate) != Error::null()) {
|
|
|