Source file
test/codegen/moveload.go
1
2
3
4
5
6
7 package codegen
8
9
10
11 type moveLoadBig struct {
12 typ int8
13 index int64
14 str string
15 pkgID string
16 }
17
18 type moveLoadHandle[T any] struct {
19 value *T
20 }
21
22 func (h moveLoadHandle[T]) Value() T { return *h.value }
23
24 type moveLoadS struct {
25 h moveLoadHandle[moveLoadBig]
26 }
27
28 func moveLoadFieldViaValue(s moveLoadS) int8 {
29
30
31 return s.h.Value().typ
32 }
33
34 func moveLoadFieldViaValueInline(ss []moveLoadS, i int) int8 {
35
36
37 return ss[i&7].h.Value().typ
38 }
39
View as plain text