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

Unified Diff: runtime/vm/object.cc

Issue 23441073: 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: address comments 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 9e2fa47592f6324cc08e9ed1f5ae672c91e1fc6c..3d06df2278a2a6ae290817d2d91c0804c74117b0 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4928,6 +4928,18 @@ void Function::BuildSignatureParameters(
}
+RawInstance* Function::ImplicitStaticClosure() const {
+ if (implicit_static_closure() == Instance::null()) {
+ ObjectStore* object_store = Isolate::Current()->object_store();
+ const Context& context = Context::Handle(object_store->empty_context());
+ const Instance& closure =
+ Instance::Handle(Closure::New(*this, context, Heap::kOld));
+ set_implicit_static_closure(closure);
+ }
+ return implicit_static_closure();
+}
+
+
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