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

Unified Diff: runtime/vm/object.cc

Issue 751183003: Expose set_source service command for functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698