return $stmt;
}
-sub gen_header { # create the ByteCode header
+sub gen_header { # create the ByteCode header: magic, archname, ivsize, ptrsize,
+ # byteorder
+ # nvtype irrelevant (floats are stored as strings)
my $header = B::Asmdata::PUT_U32(0x43424c50); # 'PLBC'
- $header .= B::Asmdata::PUT_strconst($Config{archname});
+ $header .= B::Asmdata::PUT_strconst(qq["$Config{archname}"]);
$header .= B::Asmdata::PUT_U32($Config{ivsize});
- $header .= B::Asmdata::PUT_U32($Config{nvsize});
$header .= B::Asmdata::PUT_U32($Config{ptrsize});
- $header .= B::Asmdata::PUT_strconst($Config{byteorder}); # PV not U32 because
- # of varying size
+ $header .= B::Asmdata::PUT_strconst(sprintf(qq["0x%s"], $Config{byteorder}));
+ # PV not U32 because
+ # of varying size
+
$header;
}
+
sub parse_statement {
my $stmt = shift;
my ($insn, $arg) = $stmt =~ m{
}
my $stashpv = $op->stashpv;
my $warnings = $op->warnings;
- my $warningsix;
- $warningsix = $warnings->objix;
+ my $warningsix = $warnings->objix;
$warnings->bytecode;
$op->B::OP::bytecode;
printf <<"EOT", pvstring($op->label), pvstring($stashpv), $op->cop_seq, pvstring($file), $op->arybase;
mark_saved($hv);
my $name = $hv->NAME;
my $ix = $hv->objix;
- printf "sv_refcnt %d\nsv_flags 0x%x\n", $hv->REFCNT, $hv->FLAGS;
if (!$name) {
# It's an ordinary HV. Stashes have NAME set and need no further
# saving beyond the gv_stashpv that $hv->objix already ensures.
printf("newpv %s\nhv_store %d\n",
pvstring($contents[$i]), $ixes[$i / 2]);
}
+ printf "sv_refcnt %d\nsv_flags 0x%x\n", $hv->REFCNT, $hv->FLAGS;
}
}