On 7/3/19 11:47 AM, Richard Henderson wrote: > On 7/1/19 6:35 AM, Jan Bobek wrote: >> +sub parse_emitblock($$) >> +{ >> + my ($rec, $insn) = @_; >> + my $insnname = $rec->{name}; >> + my $opcode = $insn->{opcode}{value}; >> + >> + $emit_opts = {}; >> + >> + my $emitblock = $rec->{blocks}{"emit"}; >> + if (defined $emitblock) { >> + eval_with_fields($insnname, $opcode, $rec, "emit", $emitblock); >> + } > > And if !defined? Silently discard? > > Is this just weirdness higher in the risugen stack, > such that this might be called maybe_parse_emitblock?
If !defined, there _is_ no emit block, and we treat that as an empty block. The caller gets an empty hash, and it's up to them to decide what that means. I could rename it, but the difference doesn't seem that important to me...? -Jan
signature.asc
Description: OpenPGP digital signature