I'm playing around with translating PHP byte code to the Parrot Virtual
Machine - the new virtual machine being designed and built for Perl 6
specifically with translation between languages in mind (there's already
work being done on Python VM and JVM conversions).

Many of the opcodes look like they'll be similar (I'm presuming that the
only opcodes are the ones that are defined in zend_compile.h) but I'm
looking for more documentation on what some of the rest actually do
(ZEND_(BEGIN|END)_SILENCE for example), what sort of operands they take
and the how the rest of the Zend virtual machine is made up (from the
code it looks like it's stack based - Parrot is going to be register
based which should make things interesting).

Also I'm looking for the easiest way to get hold of some intermediate
code or bytecode for simple scripts so that I can gradually start adding
conversion routines. What's the best way to do this? Hack together code
from the rest of the source tree or can I get stuff from the

Has anybody else tried doing anything like this? Am I smoking huge
quantities of crack?


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-dev @
postedSep 26, '01 at 3:24p
activeSep 26, '01 at 3:24p

1 user in discussion

Simon Wistow: 1 post



site design / logo © 2022 Grokbase