Represents the result of the last evaluated expression, used for returning values to whatever started this task.
Whether this task is currently suspended (e.g. waiting for a promise to resolve). If true, the scheduler will not run this task until it is resumed by setting suspended to false.
Return a new thing representing the current continuation at this point in evaluation, which when called will return to this point with the given value as the result of the current expression.
The continuation will capture the entire stack, so it has infinite extent.
Temporarily pop the given number of stack frames, call the callback with the new top of the stack, and then restore the popped stack frames. This is used for things like variable declaration and assignment where we need to access the correct environment to put the variable in.
If depth is greater than or equal to the current stack size, the callback will be called with the bottom of the stack (which is usually the global scope).
Exit the current stack frame, optionally with a result to return to the caller. The result will be passed back to whatever got us here (e.g. the parent stack frame or the creator of the task).
Try to take a single evaluation step in this task. Returns true if the task made progress (e.g. evaluated something or updated its state), or false if the task is currently suspended or has finished execution. If the task throws an error during evaluation, the task may end up in an undefined state.
Update the current stack entry with new arguments, returning the new stack entry.
Update the current stack entry with a new cookie value(s), returning the new stack entry. The cookie is used to track internal evaluation state for constructs that call back into Backolon code, so the Javascript implementation knows where it was and can resume evaluation from the correct point when the Backolon code returns.
The exact meaning of the cookie value(s) depends on the construct being evaluated.
Optionaldata: anyAn optional additional data to store in the stack entry, which won't be updated if not provided.
Updates the current stack entry with a new environment, returning the new stack entry. This is used when entering a new scope (e.g. injecting context-sensitive information).
Updates the current stack entry with new flags, returning the new stack entry. toSet and toClear are bitmasks of StackFlag values to set and clear respectively.
Represents a running Backolon evaluation task.