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, |