db72134f90
Rationale: Rather than forced inlining of clamped convertors (the "saturated" method _toClampedUint8() from dart:typed_data), exposing the fact that it always returns smi values (since they check fail on null inputs) yields much better Uint8ClampedListView performance (it avoids re-compilation due to a speculative CheckSmi). Note: In the long run, we may still want them inlined and improve range analysis to deal with clamping. Performance: About 2.8x faster than previous optimized version, about 4.5x faster than original. https://github.com/dart-lang/sdk/issues/33205 Change-Id: I86a06525d2f2ea0476effd3c3d856ff8d9ab1d87 Reviewed-on: https://dart-review.googlesource.com/60201 Commit-Queue: Aart Bik <ajcbik@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>