From b7493b663e0aaaae624e61fafe0e16a6374cb0a7 Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Tue, 5 Jun 2018 16:54:19 +0000 Subject: [PATCH] [vm/inliner] Inline small int convertors. Rationale: Always inline int convertors that don't do much more than testing and anding. For example, force inline v26 <- StaticCall:66( _toUint8@6027147<0> v4 T{Type: class 'int'?}) T{Type: class 'int'?} to v47 <- Constant(#255) .. CheckSmi:10(v4 T{Type: class 'int'?}) v45 <- BinarySmiOp:10(&, v4 T{_Smi}, v47 T{_Smi}) T{_Smi} https://github.com/dart-lang/sdk/issues/33205 Change-Id: I595d9a64365e16ae244480b5e27f8be23c43d164 Reviewed-on: https://dart-review.googlesource.com/58061 Commit-Queue: Aart Bik Reviewed-by: Aart Bik Reviewed-by: Vyacheslav Egorov --- runtime/vm/compiler/method_recognizer.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/vm/compiler/method_recognizer.h b/runtime/vm/compiler/method_recognizer.h index ac784dfa1916..952a9d752267 100644 --- a/runtime/vm/compiler/method_recognizer.h +++ b/runtime/vm/compiler/method_recognizer.h @@ -434,6 +434,14 @@ namespace dart { V(::, _classRangeCheckNegative, ClassRangeCheckNegated, 0x5acdfb75) \ V(::, _classRangeAssert, ClassRangeAssert, 0x6c77116e) \ V(::, _classIdEqualsAssert, ClassIdEqualsAssert, 0x09e0ae72) \ + 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) \ + V(::, _toUint32, ConvertIntToUint32, 0x17a8e085) \ V(Lists, copy, ListsCopy, 0x40e974f6) \ V(_HashVMBase, get:_index, LinkedHashMap_getIndex, 0x02477157) \ V(_HashVMBase, set:_index, LinkedHashMap_setIndex, 0x4fc8d5e0) \