7
7
package runtime
8
8
9
9
import (
10
+ "internal/abi"
10
11
"internal/runtime/sys"
11
12
)
12
13
@@ -16,77 +17,77 @@ import (
16
17
// failures in the comparisons for s[x], 0 <= x < y (y == len(s))
17
18
func goPanicExtendIndex (hi int , lo uint , y int ) {
18
19
panicCheck1 (sys .GetCallerPC (), "index out of range" )
19
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsIndex })
20
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsIndex })
20
21
}
21
22
func goPanicExtendIndexU (hi uint , lo uint , y int ) {
22
23
panicCheck1 (sys .GetCallerPC (), "index out of range" )
23
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsIndex })
24
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsIndex })
24
25
}
25
26
26
27
// failures in the comparisons for s[:x], 0 <= x <= y (y == len(s) or cap(s))
27
28
func goPanicExtendSliceAlen (hi int , lo uint , y int ) {
28
29
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
29
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSliceAlen })
30
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSliceAlen })
30
31
}
31
32
func goPanicExtendSliceAlenU (hi uint , lo uint , y int ) {
32
33
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
33
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSliceAlen })
34
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSliceAlen })
34
35
}
35
36
func goPanicExtendSliceAcap (hi int , lo uint , y int ) {
36
37
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
37
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSliceAcap })
38
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSliceAcap })
38
39
}
39
40
func goPanicExtendSliceAcapU (hi uint , lo uint , y int ) {
40
41
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
41
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSliceAcap })
42
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSliceAcap })
42
43
}
43
44
44
45
// failures in the comparisons for s[x:y], 0 <= x <= y
45
46
func goPanicExtendSliceB (hi int , lo uint , y int ) {
46
47
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
47
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSliceB })
48
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSliceB })
48
49
}
49
50
func goPanicExtendSliceBU (hi uint , lo uint , y int ) {
50
51
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
51
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSliceB })
52
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSliceB })
52
53
}
53
54
54
55
// failures in the comparisons for s[::x], 0 <= x <= y (y == len(s) or cap(s))
55
56
func goPanicExtendSlice3Alen (hi int , lo uint , y int ) {
56
57
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
57
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSlice3Alen })
58
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSlice3Alen })
58
59
}
59
60
func goPanicExtendSlice3AlenU (hi uint , lo uint , y int ) {
60
61
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
61
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSlice3Alen })
62
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSlice3Alen })
62
63
}
63
64
func goPanicExtendSlice3Acap (hi int , lo uint , y int ) {
64
65
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
65
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSlice3Acap })
66
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSlice3Acap })
66
67
}
67
68
func goPanicExtendSlice3AcapU (hi uint , lo uint , y int ) {
68
69
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
69
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSlice3Acap })
70
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSlice3Acap })
70
71
}
71
72
72
73
// failures in the comparisons for s[:x:y], 0 <= x <= y
73
74
func goPanicExtendSlice3B (hi int , lo uint , y int ) {
74
75
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
75
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSlice3B })
76
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSlice3B })
76
77
}
77
78
func goPanicExtendSlice3BU (hi uint , lo uint , y int ) {
78
79
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
79
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSlice3B })
80
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSlice3B })
80
81
}
81
82
82
83
// failures in the comparisons for s[x:y:], 0 <= x <= y
83
84
func goPanicExtendSlice3C (hi int , lo uint , y int ) {
84
85
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
85
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : boundsSlice3C })
86
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : true , y : y , code : abi . BoundsSlice3C })
86
87
}
87
88
func goPanicExtendSlice3CU (hi uint , lo uint , y int ) {
88
89
panicCheck1 (sys .GetCallerPC (), "slice bounds out of range" )
89
- panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : boundsSlice3C })
90
+ panic (boundsError {x : int64 (hi )<< 32 + int64 (lo ), signed : false , y : y , code : abi . BoundsSlice3C })
90
91
}
91
92
92
93
// Implemented in assembly, as they take arguments in registers.
0 commit comments