Example #1
0
def chaperone_vector_reference_cont(f, extra, inner, idx, app, env, cont, _vals):
    numargs = _vals.num_values()
    args    = [None] * (numargs + 2)
    args[0] = inner
    args[1] = idx
    for i in range(numargs):
        args[i+2] = _vals.get_value(i)
    if extra is None:
        return f.call_with_extra_info(args, env, check_chaperone_results(_vals, env, cont), app)
    else:
        return f.call_with_extra_info([extra] + args, env, check_chaperone_results(_vals, env, cont), app)
Example #2
0
def chp_hash_table_ref_cont(ht, old, env, cont, _vals):
    if _vals.num_values() != 2:
        raise SchemeException("hash-ref handler produced the wrong number of results")
    key  = _vals.get_value(0)
    post = _vals.get_value(1)
    key = values.Values.make1(key)
    after = check_chaperone_results(key, env,
                imp_hash_table_post_ref_cont(post, ht, old, env, cont))
    return ht.hash_ref(key, env, after)
Example #3
0
def chp_hash_table_ref_cont(ht, old, env, cont, _vals):
    if _vals.num_values() != 2:
        raise SchemeException(
            "hash-ref handler produced the wrong number of results")
    key = _vals.get_value(0)
    post = _vals.get_value(1)
    key = values.Values.make1(key)
    after = check_chaperone_results(
        key, env, imp_hash_table_post_ref_cont(post, ht, old, env, cont))
    return ht.hash_ref(key, env, after)
Example #4
0
 def post_set_box_cont(self, val, env, cont):
     vals = values.Values.make1(val)
     return check_chaperone_results(vals, env,
                                    imp_box_set_cont(self.inner, env, cont))
Example #5
0
 def post_set_cont(self, body, value, env, cont):
     vals = values.Values.make1(value)
     return check_chaperone_results(
         vals, env, imp_cmk_post_set_cont(body, self.inner, env, cont))
Example #6
0
 def post_set_cont(self, new, i, env, cont, app=None):
     vals = values.Values.make1(new)
     return check_chaperone_results(
         vals, env, imp_vec_set_cont(self.inner, i, app, env, cont))
Example #7
0
 def post_set_box_cont(self, val, env, cont):
     vals = values.Values.make1(val)
     return check_chaperone_results(vals, env, imp_box_set_cont(self.inner, env, cont))
Example #8
0
 def post_set_cont(self, body, value, env, cont):
     vals = values.Values.make1(value)
     return check_chaperone_results(vals, env,
             imp_cmk_post_set_cont(body, self.inner, env, cont))
Example #9
0
 def post_set_cont(self, new, i, env, cont, app=None):
     vals = values.Values.make1(new)
     return check_chaperone_results(vals, env,
             imp_vec_set_cont(self.inner, i, app, env, cont))