4 my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
5 print "{", join (', ', @members), "},\n";
7 for my $type (@types) {
8 next if $type->{ROLE} eq 'fixed';
10 my (@members) = ("\"$type->{NAME}\"", "\"$type->{HUMAN_NAME}\"",
11 0, "OP_$type->{NAME}", 0, "{}", 0, 0);
12 print "{", join (', ', @members), "},\n";
15 for my $opname (@order) {
16 my ($op) = $ops{$opname};
20 push (@members, "\"$op->{NAME}\"");
22 if ($op->{CATEGORY} eq 'function') {
23 my (@args, @opt_args);
24 for my $arg (@{$op->{ARGS}}) {
25 push (@args, $arg->{TYPE}{HUMAN_NAME}) if !defined $arg->{IDX};
28 if (my ($array) = array_arg ($op)) {
29 if (!defined $op->{MIN_VALID}) {
31 for (my $i = 0; $i < $array->{TIMES}; $i++) {
32 push (@array_args, $array->{TYPE}{HUMAN_NAME});
34 push (@args, @array_args);
35 @opt_args = @array_args;
37 for (my $i = 0; $i < $op->{MIN_VALID}; $i++) {
38 push (@args, $array->{TYPE}{HUMAN_NAME});
40 push (@opt_args, $array->{TYPE}{HUMAN_NAME});
43 my ($human) = "$op->{NAME}(" . join (', ', @args);
44 $human .= '[, ' . join (', ', @opt_args) . ']...' if @opt_args;
46 push (@members, "\"$human\"");
48 push (@members, "NULL");
52 push (@flags, "OPF_ABSORB_MISS") if defined $op->{ABSORB_MISS};
53 push (@flags, "OPF_ARRAY_OPERAND") if array_arg ($op);
54 push (@flags, "OPF_MIN_VALID") if defined $op->{MIN_VALID};
55 push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE};
56 push (@flags, "OPF_EXTENSION") if $op->{EXTENSION};
57 push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED};
58 push (@flags, "OPF_PERM_ONLY") if $op->{PERM_ONLY};
59 push (@members, @flags ? join (' | ', @flags) : 0);
61 push (@members, "OP_$op->{RETURNS}{NAME}");
63 push (@members, scalar (@{$op->{ARGS}}));
65 my (@arg_types) = map ("OP_$_->{TYPE}{NAME}", @{$op->{ARGS}});
66 push (@members, "{" . join (', ', @arg_types) . "}");
68 push (@members, $op->{MIN_VALID} || 0);
70 push (@members, array_arg ($op) ? ${array_arg ($op)}{TIMES} : 0);
72 print "{", join (', ', @members), "},\n";