示例#1
0
def equal_hash_ref_loop(data, idx, key, env, cont):
    from pycket.interpreter import return_value
    from pycket.prims.equal import equal_func, EqualInfo
    if idx >= len(data):
        return return_value(w_missing, env, cont)
    k, v = data[idx]
    info = EqualInfo.BASIC_SINGLETON
    return equal_func(k, key, info, env,
            catch_ref_is_equal_cont(data, idx, key, v, env, cont))
示例#2
0
def equal_hash_ref_loop(data, idx, key, env, cont):
    from pycket.interpreter import return_value
    from pycket.prims.equal import equal_func, EqualInfo
    if idx >= len(data):
        return return_value(None, env, cont)
    k, v = data[idx]
    info = EqualInfo.BASIC_SINGLETON
    return equal_func(k, key, info, env,
            catch_ref_is_equal_cont(data, idx, key, v, env, cont))
示例#3
0
文件: equal.py 项目: yws/pycket-1
def equal_hash_set_loop(data, idx, key, val, env, cont):
    from pycket.interpreter import check_one_val, return_value
    from pycket.prims.equal import equal_func, EqualInfo
    if idx >= len(data):
        data.append((key, val))
        return return_value(values.w_void, env, cont)
    k, _ = data[idx]
    info = EqualInfo.BASIC_SINGLETON
    return equal_func(k, key, info, env,
                      catch_set_is_equal_cont(data, idx, key, val, env, cont))
示例#4
0
def equal_hash_set_loop(data, idx, key, val, env, cont):
    from pycket.interpreter import check_one_val, return_value
    from pycket.prims.equal import equal_func, EqualInfo
    if idx >= len(data):
        data.append((key, val))
        return return_value(values.w_void, env, cont)
    k, _ = data[idx]
    info = EqualInfo.BASIC_SINGLETON
    return equal_func(k, key, info, env,
            catch_set_is_equal_cont(data, idx, key, val, env, cont))
示例#5
0
def check_chaperone_results_loop(vals, args, idx, env, cont):
    from pycket.interpreter import return_multi_vals
    from pycket.prims.equal import equal_func, EqualInfo
    while idx < len(args) and vals._get_list(idx) is None and args[idx] is None:
        idx += 1
    if idx >= len(args):
        return return_multi_vals(vals, env, cont)
    info = EqualInfo.CHAPERONE_SINGLETON
    return equal_func(vals._get_list(idx), args[idx], info, env,
            catch_equal_cont(vals, args, idx, env, cont))
示例#6
0
def impersonator_of(a, b, env, cont):
    info = EqualInfo.IMPERSONATOR_SINGLETON
    return equal_func(a, b, info, env, cont)
示例#7
0
def chaperone_of(a, b, env, cont):
    info = EqualInfo.CHAPERONE_SINGLETON
    return equal_func(a, b, info, env, cont)
示例#8
0
def impersonator_of(a, b, env, cont):
    info = EqualInfo.IMPERSONATOR_SINGLETON
    return equal_func(a, b, info, env, cont)
示例#9
0
def chaperone_of(a, b, env, cont):
    info = EqualInfo.CHAPERONE_SINGLETON
    return equal_func(a, b, info, env, cont)