Commit 15609758 authored by Niels Möller's avatar Niels Möller
Browse files

* src/command.c (collect_state_1): Deleted class.

(collect_state_1): Deleted class.
(collect_state_2): Deleted class.
(collect_state_3): Deleted class.
(make_collect_state_1): Deleted function.
(make_collect_state_2): Deleted function.

Rev: src/command.c:1.44
parent 1f1f128e
......@@ -449,90 +449,6 @@ struct lsh_object *collect_trace(const char *name, struct lsh_object *c)
}
#endif /* DEBUG_TRACE */
/* Collecting arguments */
struct lsh_object *
do_collect_1(struct command_simple *s, struct lsh_object *a)
{
CAST(collect_info_1, self, s);
return self->f(self, a);
}
/* GABA:
(class
(name collect_state_1)
(super command_simple)
(vars
(info object collect_info_2)
(a object lsh_object)))
*/
/* GABA:
(class
(name collect_state_2)
(super command_simple)
(vars
(info object collect_info_3)
(a object lsh_object)
(b object lsh_object)))
*/
/* GABA:
(class
(name collect_state_3)
(super command_simple)
(vars
(info object collect_info_4)
(a object lsh_object)
(b object lsh_object)
(c object lsh_object)))
*/
static struct lsh_object *
do_collect_2(struct command_simple *s,
struct lsh_object *x)
{
CAST(collect_state_1, self, s);
return self->info->f(self->info, self->a, x);
}
struct lsh_object *
make_collect_state_1(struct collect_info_1 *info,
struct lsh_object *a)
{
NEW(collect_state_1, self);
self->info = info->next;
self->a = a;
self->super.call_simple = do_collect_2;
self->super.super.call = do_call_simple_command;
return &self->super.super.super;
}
static struct lsh_object *
do_collect_3(struct command_simple *s,
struct lsh_object *x)
{
CAST(collect_state_2, self, s);
return self->info->f(self->info, self->a, self->b, x);
}
struct lsh_object *
make_collect_state_2(struct collect_info_2 *info,
struct lsh_object *a,
struct lsh_object *b)
{
NEW(collect_state_2, self);
self->info = info->next;
self->a = a;
self->b = b;
self->super.call_simple = do_collect_3;
self->super.super.call = do_call_simple_command;
return &self->super.super.super;
}
/* GABA:
(class
(name parallell_progn)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment