Skip to content

Commit

Permalink
[vm/inliner] Inline small int convertors.
Browse files Browse the repository at this point in the history
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}

#33205

Change-Id: I595d9a64365e16ae244480b5e27f8be23c43d164
Reviewed-on: https://dart-review.googlesource.com/58061
Commit-Queue: Aart Bik <[email protected]>
Reviewed-by: Aart Bik <[email protected]>
Reviewed-by: Vyacheslav Egorov <[email protected]>
  • Loading branch information
aartbik authored and [email protected] committed Jun 5, 2018
1 parent 6b71414 commit b7493b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/vm/compiler/method_recognizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit b7493b6

Please sign in to comment.