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

Unified Diff: runtime/vm/code_generator.cc

Issue 517383005: VM: Clean up generated code for NoSuchMethod invocation of closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/vm/code_generator.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 39693)
+++ runtime/vm/code_generator.cc (working copy)
@@ -1003,24 +1003,21 @@
// Invoke appropriate noSuchMethod function.
-// Arg0: receiver.
-// Arg1: ic-data.
-// Arg2: arguments descriptor array.
-// Arg3: arguments array.
-DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction, 4) {
+// Arg0: receiver (closure object)
+// Arg1: arguments descriptor array.
+// Arg2: arguments array.
+DEFINE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod, 3) {
const Instance& receiver = Instance::CheckedHandle(arguments.ArgAt(0));
- const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(1));
- const Array& orig_arguments_desc = Array::CheckedHandle(arguments.ArgAt(2));
- const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(3));
+ const Array& orig_arguments_desc = Array::CheckedHandle(arguments.ArgAt(1));
+ const Array& orig_arguments = Array::CheckedHandle(arguments.ArgAt(2));
- String& original_function_name = String::Handle(ic_data.target_name());
- if (receiver.IsClosure()) {
- // For closure the function name is always 'call'. Replace it with the
- // name of the closurized function so that exception contains more
- // relevant information.
- const Function& function = Function::Handle(Closure::function(receiver));
- original_function_name = function.QualifiedUserVisibleName();
- }
+ // For closure the function name is always 'call'. Replace it with the
+ // name of the closurized function so that exception contains more
+ // relevant information.
+ ASSERT(receiver.IsClosure());
+ const Function& function = Function::Handle(Closure::function(receiver));
+ const String& original_function_name =
+ String::Handle(function.QualifiedUserVisibleName());
const Object& result = Object::Handle(
DartEntry::InvokeNoSuchMethod(receiver,
original_function_name,
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698