[vm/inliner] Add smi return type of clamped convertors.

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>
diff --git a/runtime/vm/compiler/method_recognizer.h b/runtime/vm/compiler/method_recognizer.h
index 952a9d7..bb61216 100644
--- a/runtime/vm/compiler/method_recognizer.h
+++ b/runtime/vm/compiler/method_recognizer.h
@@ -44,6 +44,7 @@
   V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, Dynamic, 0x38a80b0d)     \
   V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, Dynamic, 0x40052c4e) \
   V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, Dynamic, 0x07b89f54)     \
+  V(::, _toClampedUint8, ConvertIntToClampedUint8, Smi, 0x564b0435)            \
   V(_StringBase, _interpolate, StringBaseInterpolate, Dynamic, 0x01ecb15a)     \
   V(_IntegerImplementation, toDouble, IntegerToDouble, Double, 0x05da96ed)     \
   V(_Double, _add, DoubleAdd, Double, 0x2a38277b)                              \
@@ -437,7 +438,6 @@
   V(::, _toInt, ConvertMaskedInt, 0x713908fd)                                  \
   V(::, _toInt8, ConvertIntToInt8, 0x7484a780)                                 \
   V(::, _toUint8, ConvertIntToUint8, 0x0a15b522)                               \
-  V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x564b0435)                 \
   V(::, _toInt16, ConvertIntToInt16, 0x0a83fcc6)                               \
   V(::, _toUint16, ConvertIntToUint16, 0x6087d1af)                             \
   V(::, _toInt32, ConvertIntToInt32, 0x62b451b9)                               \