QtQml: Make sure to mark generator stack frames properly
The interpreter doesn't use write barriers when writing the stack since
we expect the stack to be (re-)marked as needed by the GC. However,
generator functions execute on a special piece of stack they keep in an
object. That one a, needs extra marking during the regular stack marking
and b, needs a write barrier when we take the frame off the stack so
that any writes done to it before get marked.
Pick-to: 6.12 6.8
Fixes: QTBUG-151273
Change-Id: Iec68fb5c1abd09335182ac9dec771a20dcd464b6
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>