4 print "#include \"helpers.h\"\n\n";
6 for my $opname (@order) {
7 my ($op) = $ops{$opname};
8 next if $op->{UNIMPLEMENTED};
11 for my $arg (@{$op->{ARGS}}) {
12 if (!defined $arg->{IDX}) {
13 push (@args, c_type ($arg->{TYPE}) . $arg->{NAME});
15 push (@args, c_type ($arg->{TYPE}) . "$arg->{NAME}" . "[]");
16 push (@args, "size_t $arg->{IDX}");
19 for my $aux (@{$op->{AUX}}) {
20 push (@args, c_type ($aux->{TYPE}) . $aux->{NAME});
22 push (@args, "void") if !@args;
24 my ($statements) = $op->{BLOCK} || " return $op->{EXPRESSION};\n";
26 print "static inline ", c_type ($op->{RETURNS}), "\n";
27 print "eval_$opname (", join (', ', @args), ")\n";