11 my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
12 print "{", join (', ', @members), "},\n";
14 for my $type (@types) {
15 next if $type->{ROLE} eq 'fixed';
17 my (@members) = ("\"$type->{NAME}\"", "\"$type->{HUMAN_NAME}\"",
18 0, "OP_$type->{NAME}", 0, "{}", 0, 0);
19 print "{", join (', ', @members), "},\n";
22 for my $opname (@order) {
23 my ($op) = $ops{$opname};
27 push (@members, "\"$op->{NAME}\"");
29 if ($op->{CATEGORY} eq 'function') {
30 my (@args, @opt_args);
31 for my $arg (@{$op->{ARGS}}) {
32 push (@args, $arg->{TYPE}{HUMAN_NAME}) if !defined $arg->{IDX};
35 if (my ($array) = array_arg ($op)) {
36 if (!defined $op->{MIN_VALID}) {
38 for (my $i = 0; $i < $array->{TIMES}; $i++) {
39 push (@array_args, $array->{TYPE}{HUMAN_NAME});
41 push (@args, @array_args);
42 @opt_args = @array_args;
44 for (my $i = 0; $i < $op->{MIN_VALID}; $i++) {
45 push (@args, $array->{TYPE}{HUMAN_NAME});
47 push (@opt_args, $array->{TYPE}{HUMAN_NAME});
50 my ($human) = "$op->{NAME}(" . join (', ', @args);
51 $human .= '[, ' . join (', ', @opt_args) . ']...' if @opt_args;
53 push (@members, "\"$human\"");
55 push (@members, "NULL");
59 push (@flags, "OPF_ABSORB_MISS") if defined $op->{ABSORB_MISS};
60 push (@flags, "OPF_ARRAY_OPERAND") if array_arg ($op);
61 push (@flags, "OPF_MIN_VALID") if defined $op->{MIN_VALID};
62 push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE};
63 push (@flags, "OPF_EXTENSION") if $op->{EXTENSION};
64 push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED};
65 push (@members, @flags ? join (' | ', @flags) : 0);
67 push (@members, "OP_$op->{RETURNS}{NAME}");
69 push (@members, scalar (@{$op->{ARGS}}));
71 my (@arg_types) = map ("OP_$_->{TYPE}{NAME}", @{$op->{ARGS}});
72 push (@members, "{" . join (', ', @arg_types) . "}");
74 push (@members, $op->{MIN_VALID} || 0);
76 push (@members, array_arg ($op) ? ${array_arg ($op)}{TIMES} : 0);
78 print "{", join (', ', @members), "},\n";