static pic_value pic_cont_call_with_values(pic_state *pic) { struct pic_proc *producer, *consumer; int argc; pic_vec *args; pic_get_args(pic, "ll", &producer, &consumer); pic_apply0(pic, producer); argc = pic_receive(pic, 0, NULL); args = pic_make_vec(pic, argc); pic_receive(pic, argc, args->data); return pic_apply_trampoline(pic, consumer, argc, args->data); }
static pic_value pic_cont_call_with_values(pic_state *pic) { struct pic_proc *producer, *consumer; size_t argc; pic_value args[256]; pic_get_args(pic, "ll", &producer, &consumer); pic_apply(pic, producer, pic_nil_value()); argc = pic_receive(pic, 256, args); return pic_apply_trampoline(pic, consumer, pic_list_by_array(pic, argc, args)); }