MCPcopy Create free account
hub / github.com/dispatchrun/coroutine / NestedLoops

Function NestedLoops

compiler/testdata/coroutine_durable.go:175–254  ·  view source on GitHub ↗

go:noinline

(_fn0 int)

Source from the content-addressed store, hash-verified

173
174//go:noinline
175func NestedLoops(_fn0 int) (_ int) {
176 _c := coroutine.LoadContext[int, any]()
177 var _f0 *struct {
178 IP int
179 X0 int
180 X1 int
181 X2 int
182 X3 int
183 X4 int
184 } = coroutine.Push[struct {
185 IP int
186 X0 int
187 X1 int
188 X2 int
189 X3 int
190 X4 int
191 }](&_c.Stack)
192 if _f0.IP == 0 {
193 *_f0 = struct {
194 IP int
195 X0 int
196 X1 int
197 X2 int
198 X3 int
199 X4 int
200 }{X0: _fn0}
201 }
202 defer func() {
203 if !_c.Unwinding() {
204 coroutine.Pop(&_c.Stack)
205 }
206 }()
207 switch {
208 case _f0.IP < 2:
209 _f0.IP = 2
210 fallthrough
211 case _f0.IP < 7:
212 switch {
213 case _f0.IP < 3:
214 _f0.X2 = 1
215 _f0.IP = 3
216 fallthrough
217 case _f0.IP < 7:
218 for ; _f0.X2 <= _f0.X0; _f0.X2, _f0.IP = _f0.X2+1, 3 {
219 switch {
220 case _f0.IP < 4:
221 _f0.X3 = 1
222 _f0.IP = 4
223 fallthrough
224 case _f0.IP < 7:
225 for ; _f0.X3 <= _f0.X0; _f0.X3, _f0.IP = _f0.X3+1, 4 {
226 switch {
227 case _f0.IP < 5:
228 _f0.X4 = 1
229 _f0.IP = 5
230 fallthrough
231 case _f0.IP < 7:
232 for ; _f0.X4 <= _f0.X0; _f0.X4, _f0.IP = _f0.X4+1, 5 {

Callers

nothing calls this directly

Calls 3

LoadContextFunction · 0.92
PopFunction · 0.92
UnwindingMethod · 0.80

Tested by

no test coverage detected