DescriptionFix #14144 confusing error message misusing a callable object
New tests to make sure that:
* Error message calling a closure wrong is unchanged
* Error message calling a static function wrong is unchanged
* Error message calling a callable object wrong is unchanged
* Error message calling nonexist method is unchanged
* Error message calling nonexist method for a callable object is clearer
The new tests involving calling a closure wrong exposed a bug in the
inliner, it assumed (due to lack of ic data, it seems) that all closures
have the right number of arguments. Left that assertion/behavior, but
put a guard around closures specifically (since static and method calls
don't have that bug, due to I think better ic data).
Welcoming myself to the world of VMs.
BUG=
R=fschneider@google.com
Committed: https://github.com/dart-lang/sdk/commit/761d21d41466eae28074ff7a42a75f60ad4fde6c
Patch Set 1 #
Total comments: 2
Patch Set 2 : Florian feedback: Check callbar vs call(bar), optional argc for inline #Patch Set 3 : Remove the check to 'call' methods to report closures. Clearer this way. #
Total comments: 5
Patch Set 4 : Macnak feedback: Function is abstract, and prefer contains over indexOf #Patch Set 5 : Realized that doing .runtimeType == _Closure is unnecessary, doing 'is' now. #
Messages
Total messages: 9 (2 generated)
|