Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 57 lines (52 sloc) 1.703 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
#!/bin/sh
# use the actual perl from the Makefile (perld, perl5.10.0, perl5.8.8, perl5.11.0, ...)
PERL=`grep "^PERL =" Makefile|cut -c8-`
#PERL=perl5.11.0
OCMD="$PERL -Mblib -MO=Bytecode,"
ICMD="$PERL -Mblib -MByteLoader"

make

#basics
if false; then
echo "print 'hi'" > bytecode1.pl
echo ${OCMD}-obytecode1.plc bytecode1.pl
${OCMD}-obytecode1.plc bytecode1.pl
${OCMD}-O6,-obytecode1O6.plc bytecode1.pl
${OCMD}-k,-obytecode1k.plc bytecode1.pl
${OCMD}-S,-obytecode1S.asm bytecode1.pl
echo $PERL -Mblib -MO=Debug bytecode1.pl > bytecode1.dbg
$PERL -Mblib -MO=Debug bytecode1.pl > bytecode1.dbg
$PERL -Mblib -MO=Concise bytecode1.pl > bytecode1.concise
$PERL -Mblib script/assemble bytecode1S.asm bytecode1S.plc
$PERL -Mblib script/disassemble bytecode1k.plc > bytecode1k.asm
${OCMD}-TI,-obytecode1TI.plc bytecode1.pl
${OCMD}-H,-obytecode1H.plc bytecode1.pl
echo ${ICMD} bytecode1.plc
${ICMD} bytecode1.plc
fi

#PMOP
if true; then
echo "for (1,2,3) { print if /\d/ }" > bytecode2.pl
echo ${OCMD}-obytecode2.plc bytecode2.pl
${OCMD}-obytecode2.plc,-DM bytecode2.pl
${OCMD}-S,-obytecode2S.asm bytecode2.pl
echo $PERL -Mblib -MO=Debug bytecode2.pl > bytecode2.dbg
$PERL -Mblib -MO=Debug bytecode2.pl > bytecode2.dbg
$PERL -Mblib -MO=Concise bytecode2.pl > bytecode2.concise
echo ${ICMD} bytecode2.plc
${ICMD} bytecode2.plc
fi
#only if ByteLoader installed in @INC
if false; then
echo ${OCMD}-H,-obytecode2.plc bytecode2.pl
${OCMD}-H,-obytecode2.plc bytecode2.pl
chmod +x bytecode2.plc
echo ./bytecode2.plc
./bytecode2.plc
fi

# package
if false; then
echo "package MY::Test;" > bytecode1.pm
echo "print 'hi'" >> bytecode1.pm
echo ${OCMD}-m,-obytecode1.pmc bytecode1.pm
${OCMD}-obytecode1.pmc bytecode1.pm
fi
Something went wrong with that request. Please try again.