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

Unified Diff: runtime/vm/object.cc

Issue 188703004: Fix invocation of closures via .call in the VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 33570)
+++ runtime/vm/object.cc (working copy)
@@ -2254,7 +2254,8 @@
};
ASSERT(kind == RawFunction::kNoSuchMethodDispatcher ||
- kind == RawFunction::kInvokeFieldDispatcher);
+ kind == RawFunction::kInvokeFieldDispatcher ||
+ kind == RawFunction::kInvokeClosureDispatcher);
Function& dispatcher = Function::Handle();
Array& cache = Array::Handle(invocation_dispatcher_cache());
ASSERT(!cache.IsNull());
@@ -4656,7 +4657,8 @@
RawArray* Function::saved_args_desc() const {
ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher ||
- kind() == RawFunction::kInvokeFieldDispatcher);
+ kind() == RawFunction::kInvokeFieldDispatcher ||
+ kind() == RawFunction::kInvokeClosureDispatcher);
const Object& obj = Object::Handle(raw_ptr()->data_);
ASSERT(obj.IsArray());
return Array::Cast(obj).raw();
@@ -4665,7 +4667,8 @@
void Function::set_saved_args_desc(const Array& value) const {
ASSERT(kind() == RawFunction::kNoSuchMethodDispatcher ||
- kind() == RawFunction::kInvokeFieldDispatcher);
+ kind() == RawFunction::kInvokeFieldDispatcher ||
+ kind() == RawFunction::kInvokeClosureDispatcher);
ASSERT(raw_ptr()->data_ == Object::null());
set_data(value);
}
@@ -4814,6 +4817,9 @@
case RawFunction::kInvokeFieldDispatcher:
return "kInvokeFieldDispatcher";
break;
+ case RawFunction::kInvokeClosureDispatcher:
+ return "kInvokeClosureDispatcher";
+ break;
default:
UNREACHABLE();
return NULL;
@@ -6066,6 +6072,9 @@
case RawFunction::kInvokeFieldDispatcher:
kind_str = "invoke-field-dispatcher";
break;
+ case RawFunction::kInvokeClosureDispatcher:
+ kind_str = "invoke-closure-dispatcher";
+ break;
default:
UNREACHABLE();
}
@@ -6097,7 +6106,9 @@
} else if (IsImplicitClosureFunction()) {
id = cls.FindImplicitClosureFunctionIndex(*this);
selector = "implicit_closures";
- } else if (IsNoSuchMethodDispatcher() || IsInvokeFieldDispatcher()) {
+ } else if (IsNoSuchMethodDispatcher() ||
+ IsInvokeFieldDispatcher() ||
+ IsInvokeClosureDispatcher()) {
id = cls.FindInvocationDispatcherFunctionIndex(*this);
selector = "dispatchers";
} else {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698