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))
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))
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))
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))
def impersonator_of(a, b, env, cont): info = EqualInfo.IMPERSONATOR_SINGLETON return equal_func(a, b, info, env, cont)
def chaperone_of(a, b, env, cont): info = EqualInfo.CHAPERONE_SINGLETON return equal_func(a, b, info, env, cont)