Closed
Description
Refs: bellard/quickjs#394
function* f(r){ return r } // must return r
[...f({})]
r
's ref count in async_func_free is 2, not 1.
f
's bytecode looks like this:
;; function* f(r){ return r }
initial_yield
get_arg0 0 ; r
return_async
The async stack frame at time of free looks like this: [r, undefined]
(where slot 0 is arg 0); I suspect it should be [r, r]
because then the ref counts would match up.