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

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: rebase 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c63b4a60fa5f211fd288a12694058b6c62287bb5..e92b33cdc4721b4a0e55a4680d74c015302f8fb8 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4928,6 +4928,18 @@ void Function::BuildSinatureParameters(
}
+RawInstance* Function::ImplicitStaticClosure() const {
+ Instance& closure = Instance::Handle(implicit_static_closure());
+ if (closure.IsNull()) {
siva 2013/09/25 20:17:57 if (implicit_static_closure() != Instance::null())
rmacnak 2013/09/25 21:41:35 Done.
+ 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,

Powered by Google App Engine
This is Rietveld 408576698