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

Unified Diff: runtime/vm/flow_graph_builder.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/lib/mirrors_impl.dart ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 8a6fd1c464f243ddf5e61b3124c8805dbcc8252e..ec2b20245d9d956e46d3ad46290084cd98eaa3be 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2029,14 +2029,8 @@ void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
const Function& function = node->function();
if (function.IsImplicitStaticClosureFunction()) {
- Instance& closure = Instance::ZoneHandle();
- closure ^= function.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(function, context, Heap::kOld);
- function.set_implicit_static_closure(closure);
- }
+ const Instance& closure =
+ Instance::ZoneHandle(function.ImplicitStaticClosure());
ReturnDefinition(new ConstantInstr(closure));
return;
}
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698