[vm/jit] Check type arguments against bounds in closures.

Fixes #37572

Change-Id: I716b6b20ba6f93f52f077724fe31a0aff85ac340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118501
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
This commit is contained in:
Régis Crelier 2019-09-24 15:51:49 +00:00 committed by commit-bot@chromium.org
parent fc56445218
commit 22b32075b1

View file

@ -33,7 +33,8 @@ bool MethodCanSkipTypeChecksForNonCovariantArguments(
// In AOT mode we don't dynamically generate such trampolines but instead rely
// on a static analysis to discover which methods can be invoked dynamically,
// and generate the necessary trampolines during precompilation.
if (method.name() == Symbols::Call().raw()) {
if (method.name() == Symbols::Call().raw() ||
method.CanReceiveDynamicInvocation()) {
// Currently we consider all call methods to be invoked dynamically and
// don't mangle their names.
// TODO(vegorov) remove this once we also introduce special type checking