print "$func->{debugname}:\n";
+ if($func->{first_statement} < 0) # builtin
+ {
+ printf INSTRUCTION_FORMAT, '', '', '.BUILTIN';
+ printf OPERAND_FORMAT, -$func->{first_statement};
+ print INSTRUCTION_SEPARATOR;
+ return;
+ }
+
my $initializer = sub
{
my ($ofs) = @_;
{
my ($progs, $func) = @_;
-
return
if $func->{first_statement} < 0; # builtin
$progs->{temps} = \%istemp;
# globaldefs
- my @globaldefs = (undef) x @{$progs->{globaldefs}};
+ my @globaldefs = (undef) x @{$progs->{globals}};
for(@{$progs->{globaldefs}})
{
$globaldefs[$_->{ofs}] //= $_
print STDERR "Detecting constants and temps, and naming...\n";
detect_constants \%p;
+ if($ENV{DUMP})
+ {
+ use Data::Dumper;
+ print Dumper \%p;
+ return;
+ }
+
# what do we want to do?
my $checkfunc = \&find_uninitialized_locals;
if($ENV{DISASSEMBLE})