static StackFrame *StackFrameNewBody(const Body *owner) { StackFrame *frame = StackFrameNew(STACK_FRAME_TYPE_BODY, false); frame->data.body.owner = owner; return frame; }
static StackFrame *StackFrameNewPromiseIteration(const Promise *owner) { StackFrame *frame = StackFrameNew(STACK_FRAME_TYPE_PROMISE_ITERATION, true); frame->data.promise_iteration.owner = owner; return frame; }
static StackFrame *StackFrameNewPromise(const Promise *owner) { StackFrame *frame = StackFrameNew(STACK_FRAME_TYPE_PROMISE, true); frame->data.promise.owner = owner; frame->data.promise.variables = HashInit(); return frame; }
static StackFrame *StackFrameNewBundle(const Bundle *owner, bool inherit_previous) { StackFrame *frame = StackFrameNew(STACK_FRAME_TYPE_BUNDLE, inherit_previous); frame->data.bundle.owner = owner; frame->data.bundle.contexts = StringSetNew(); frame->data.bundle.contexts_negated = StringSetNew(); return frame; }
void EvalContextStackPushFrame(EvalContext *ctx, bool inherits_previous) { StackFrame *frame = StackFrameNew(inherits_previous); SeqAppend(ctx->stack, frame); }