SNAPSHOTTOMARK functions produces a STRING which contains WarpScript code to regenerate the stack up to the first
MARK in the exact same state as when
SNAPSHOTTOMARK was called.
MARK is consumed off the stack but will not be pushed back by the produced WarpScript code.
Note that some types of objects created by third party functions may not be serializable,
SNAPSHOTTOMARK will emit a STRING of the form
UNSUPPORTED: class xxx when such a type is encountered.
The elements of the stack are consumed up to the mark.