Returns a closure that pushed the given value onto a Machine's stack.

    We use this to embed stack pushes in the VM code, so that the interpreter
    can assume that all instructions are callable Python functions. This makes
    dispatching much faster than checking if an instruction is a constant
    (number, string, etc) or a Python function.

def make_embedded_push(value):
    """Returns a closure that pushed the given value onto a Machine's stack.

    We use this to embed stack pushes in the VM code, so that the interpreter
    can assume that all instructions are callable Python functions. This makes
    dispatching much faster than checking if an instruction is a constant
    (number, string, etc) or a Python function.
    """
    push = lambda vm: vm.push(value)
    push.tag = EMBEDDED_PUSH_TAG
    return push