9 print "#include \"helpers.h\"\n\n";
11 for my $opname (@order) {
12 my ($op) = $ops{$opname};
13 next if $op->{UNIMPLEMENTED};
16 for my $arg (@{$op->{ARGS}}) {
17 if (!defined $arg->{IDX}) {
18 push (@args, c_type ($arg->{TYPE}) . $arg->{NAME});
20 push (@args, c_type ($arg->{TYPE}) . "$arg->{NAME}" . "[]");
21 push (@args, "size_t $arg->{IDX}");
24 for my $aux (@{$op->{AUX}}) {
25 push (@args, c_type ($aux->{TYPE}) . $aux->{NAME});
27 push (@args, "void") if !@args;
29 my ($statements) = $op->{BLOCK} || " return $op->{EXPRESSION};\n";
31 print "static inline ", c_type ($op->{RETURNS}), "\n";
32 print "eval_$opname (", join (', ', @args), ")\n";