go:noinline
(_fn0 int)
| 22 | |
| 23 | //go:noinline |
| 24 | func SquareGenerator(_fn0 int) { |
| 25 | _c := coroutine.LoadContext[int, any]() |
| 26 | var _f0 *struct { |
| 27 | IP int |
| 28 | X0 int |
| 29 | X1 int |
| 30 | } = coroutine.Push[struct { |
| 31 | IP int |
| 32 | X0 int |
| 33 | X1 int |
| 34 | }](&_c.Stack) |
| 35 | if _f0.IP == 0 { |
| 36 | *_f0 = struct { |
| 37 | IP int |
| 38 | X0 int |
| 39 | X1 int |
| 40 | }{X0: _fn0} |
| 41 | } |
| 42 | defer func() { |
| 43 | if !_c.Unwinding() { |
| 44 | coroutine.Pop(&_c.Stack) |
| 45 | } |
| 46 | }() |
| 47 | switch { |
| 48 | case _f0.IP < 2: |
| 49 | _f0.X1 = 1 |
| 50 | _f0.IP = 2 |
| 51 | fallthrough |
| 52 | case _f0.IP < 3: |
| 53 | for ; _f0.X1 <= _f0.X0; _f0.X1, _f0.IP = _f0.X1+1, 2 { |
| 54 | coroutine.Yield[int, any](_f0.X1 * _f0.X1) |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | //go:noinline |
| 60 | func SquareGeneratorTwice(_fn0 int) { |
no test coverage detected