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