Beispiel #1
0
def imp_proc_cont(arg_count, proc, prop, calling_app, env, cont, _vals):
    vals = _vals.get_all_values()
    if len(vals) == arg_count + 1:
        vals, check = vals[1:], vals[0]
        cont = call_extra_cont(check, calling_app, env, cont)
    else:
        assert len(vals) == arg_count
    if isinstance(prop, values.W_Cons):
        # XXX Handle the case where |key| is a proxied continuation mark key
        key, val = prop.car(), prop.cdr()
        if isinstance(key, values.W_ContinuationMarkKey):
            body = values.W_ThunkProcCMK(proc, vals)
            return key.set_cmk(body, val, cont, env, cont)
        cont.update_cm(key, val)
    return proc.call_with_extra_info(vals, env, cont, calling_app)
Beispiel #2
0
def chp_proc_do_set_cmk_cont(proc, key, val, calling_frame, env, cont, _vals):
    vals = _vals.get_all_values()
    body = values.W_ThunkProcCMK(proc, vals)
    return key.set_cmk(body, val, calling_frame, env, cont)