From 76e7bfbb4e3a6114a33c7dba666fdd26698bedc5 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 14 May 2025 15:53:58 -0400 Subject: runtime: move atoi to internal/runtime/strconv Moving to a smaller package allows its use in other internal/runtime packages. This isn't internal/strconvlite since it can't be used directly by strconv. For #73193. Change-Id: I6a6a636c9c8b3f06b5fd6c07fe9dd5a7a37d1429 Reviewed-on: https://go-review.googlesource.com/c/go/+/672697 Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Pratt --- src/internal/runtime/math/math.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/internal/runtime/math') diff --git a/src/internal/runtime/math/math.go b/src/internal/runtime/math/math.go index e0fdc3438d..7b616cff79 100644 --- a/src/internal/runtime/math/math.go +++ b/src/internal/runtime/math/math.go @@ -8,7 +8,10 @@ import "internal/goarch" const ( MaxUint32 = ^uint32(0) + MaxUint64 = ^uint64(0) MaxUintptr = ^uintptr(0) + + MaxInt64 = int64(MaxUint64 >> 1) ) // MulUintptr returns a * b and whether the multiplication overflowed. -- cgit v1.3