Files
sdk/runtime
Martin Kustermann 933d8e913f [vm/compiler] Do not speculate operands to e kSmiCid if we know from interface target it cannot be a Smi
Hitting the assertion from the issue (see below) is innocent: It
informs us that we should avoid speculating operands to be Smis if we
actually know for sure the receiver cannot be a Smi (based on interface
target).

This particular case was hit on an instance call `a ^ b` where the interface
type tells us it is `boo.^` - so we shouldn't insert CheckedSmiOp.

There might be more cases where we insert CheckedSmiOp/CheckedSmiComparison
instructions where we shouldn't (because interface target tells us
receiver cannot be a Smi).
-> In debug mode we'll hit this assertion, so if the fuzzer finds more such
   cases, we should fix them one-by-one.

Fixes https://github.com/dart-lang/sdk/issues/40937

Change-Id: I55624f77b9edeece4d1334f1629ce5514cf3784a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139812
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-17 19:59:05 +00:00
..
2019-09-05 09:51:13 +00:00