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

Unified Diff: runtime/vm/object.cc

Issue 23909002: Implement closurization of regular methods in ObjectMirror.getField in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months 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/resolver.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 e428eca0d64aae77c98747ba7d9896346d341718..a7ede6316c3ec6e0be8bfd429705186c4d86b88d 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4800,6 +4800,18 @@ RawFunction* Function::ImplicitClosureFunction() const {
}
+RawInstance* Function::ImplicitStaticClosure() const {
+ Instance& closure = Instance::Handle(implicit_static_closure());
+ if (closure.IsNull()) {
+ ObjectStore* object_store = Isolate::Current()->object_store();
+ const Context& context = Context::Handle(object_store->empty_context());
+ closure ^= Closure::New(*this, context, Heap::kOld);
+ set_implicit_static_closure(closure);
+ }
+ return closure.raw();
+}
+
+
RawString* Function::BuildSignature(
bool instantiate,
NameVisibility name_visibility,
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698