This is a corollary to #14 :
If scripts can be suspended, handles to c++ objects may become invalid, with no possibility of the script to counter this. The only out is to embrace access to such objects by try/catch blocks - which is ugly.
Proposal: add block-element:
Which suspends vm before entering the block if less than ops are available.
Ops spend in the block can be counted, and the ops parameter can be increased accordingly during runtime.
Needs adjustments to sqvm.cc, sqcompiler.cc
This is a corollary to #14 :
If scripts can be suspended, handles to c++ objects may become invalid, with no possibility of the script to counter this. The only out is to embrace access to such objects by try/catch blocks - which is ugly.
Proposal: add block-element:
Which suspends vm before entering the block if less than ops are available.
Ops spend in the block can be counted, and the ops parameter can be increased accordingly during runtime.
Needs adjustments to sqvm.cc, sqcompiler.cc