- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ConstOverflow (0.15 sec)
-
src/cmd/compile/internal/typecheck/typecheck.go
base.Errorf("invalid slice index %v (out of bounds for %d-byte string)", r, len(ir.StringVal(l))) return false } else if ir.ConstOverflow(x, types.Types[types.TINT]) { base.Errorf("invalid slice index %v (index too large)", r) return false } } return true } func checksliceconst(lo ir.Node, hi ir.Node) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/const.go
return -1 } if !n.Type().IsInteger() && n.Type().Kind() != types.TIDEAL { return -1 } v := toint(n.Val()) if v.Kind() != constant.Int || constant.Sign(v) < 0 { return -1 } if ir.ConstOverflow(v, types.Types[types.TINT]) { return -2 } return ir.IntVal(types.Types[types.TINT], v) } // callOrChan reports whether n is a call or channel operation. func callOrChan(n ir.Node) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 10.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
if !n.Len.Type().IsInteger() && n.Type().Kind() != types.TIDEAL { base.Errorf("non-integer len argument in OMAKESLICECOPY") } if ir.IsConst(n.Len, constant.Int) { if ir.ConstOverflow(n.Len.Val(), types.Types[types.TINT]) { base.Fatalf("len for OMAKESLICECOPY too large") } if constant.Sign(n.Len.Val()) < 0 { base.Fatalf("len for OMAKESLICECOPY must be non-negative") } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 21.1K bytes - Viewed (0)