@@ -1748,27 +1748,27 @@ func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
1748
1748
// Bounds checking.
1749
1749
if ! frame .fn .IsNoBounds () {
1750
1750
checkFunc := "sliceBoundsCheckMake"
1751
- biggestInt := c .uintptrType
1752
- biggestIntWidth := biggestInt .IntTypeWidth ()
1753
- if sliceLen .Type ().IntTypeWidth () > biggestIntWidth || sliceCap .Type ().IntTypeWidth () > biggestIntWidth {
1751
+ capacityType := c .uintptrType
1752
+ capacityTypeWidth := capacityType .IntTypeWidth ()
1753
+ if sliceLen .Type ().IntTypeWidth () > capacityTypeWidth || sliceCap .Type ().IntTypeWidth () > capacityTypeWidth {
1754
1754
// System that is less than 64bit, meaning that the slice make
1755
1755
// params are bigger than uintptr.
1756
1756
checkFunc = "sliceBoundsCheckMake64"
1757
- biggestInt = c .ctx .Int64Type ()
1758
- biggestIntWidth = biggestInt .IntTypeWidth ()
1757
+ capacityType = c .ctx .Int64Type ()
1758
+ capacityTypeWidth = capacityType .IntTypeWidth ()
1759
1759
}
1760
- if sliceLen .Type ().IntTypeWidth () < biggestIntWidth {
1760
+ if sliceLen .Type ().IntTypeWidth () < capacityTypeWidth {
1761
1761
if expr .Len .Type ().(* types.Basic ).Info ()& types .IsUnsigned != 0 {
1762
- sliceLen = c .builder .CreateZExt (sliceLen , biggestInt , "" )
1762
+ sliceLen = c .builder .CreateZExt (sliceLen , capacityType , "" )
1763
1763
} else {
1764
- sliceLen = c .builder .CreateSExt (sliceLen , biggestInt , "" )
1764
+ sliceLen = c .builder .CreateSExt (sliceLen , capacityType , "" )
1765
1765
}
1766
1766
}
1767
- if sliceCap .Type ().IntTypeWidth () < biggestIntWidth {
1767
+ if sliceCap .Type ().IntTypeWidth () < capacityTypeWidth {
1768
1768
if expr .Cap .Type ().(* types.Basic ).Info ()& types .IsUnsigned != 0 {
1769
- sliceCap = c .builder .CreateZExt (sliceCap , biggestInt , "" )
1769
+ sliceCap = c .builder .CreateZExt (sliceCap , capacityType , "" )
1770
1770
} else {
1771
- sliceCap = c .builder .CreateSExt (sliceCap , biggestInt , "" )
1771
+ sliceCap = c .builder .CreateSExt (sliceCap , capacityType , "" )
1772
1772
}
1773
1773
}
1774
1774
maxSliceSize := maxSize
0 commit comments