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

Unified Diff: runtime/vm/native_arguments.h

Issue 678763004: Make CTX allocatable by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: incorporated latest comments Created 6 years, 2 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/native_arguments.h
===================================================================
--- runtime/vm/native_arguments.h (revision 41393)
+++ runtime/vm/native_arguments.h (working copy)
@@ -101,7 +101,9 @@
int function_bits = FunctionBits::decode(argc_tag_);
if (function_bits == (kClosureFunctionBit | kInstanceFunctionBit)) {
// Retrieve the receiver from the context.
- const Context& context = Context::Handle(isolate_->top_context());
+ const Object& closure = Object::Handle(ArgAt(0));
+ const Context& context =
+ Context::Handle(Closure::context(Instance::Cast(closure)));
return context.At(0);
}
return ArgAt(NumHiddenArgs(function_bits));

Powered by Google App Engine
This is Rietveld 408576698