Here's an idea which may suit someone who wants to spend some time
doing something helpful with the perl internals while not having to
understand a great deal about them. Maybe there's a lurker out there
itching to get started but not knowing what to do (we can but hope :-)
Take a look at dump.c, in particular dump_op. The -Dx debugging
option to perl uses this to dump information about the op tree.
The format is human-readable.
Your mission, should you choose to accept it, is to tweak this
(or write corresponding functions) which produce output in a more
machine-readable format and then write a parser for it. Why? Once
that's done, it shouldn't be too hard to create an "undumper"
backend which reconstructs ops and SVs as it goes along (in which
case we have a compiler of sorts) or to to do post-processing of
the op tree (which paves the way for some high-level optimisations).
This suggestion will self-destruct in 5 seconds.
--Malcolm
--
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services
doing something helpful with the perl internals while not having to
understand a great deal about them. Maybe there's a lurker out there
itching to get started but not knowing what to do (we can but hope :-)
Take a look at dump.c, in particular dump_op. The -Dx debugging
option to perl uses this to dump information about the op tree.
The format is human-readable.
Your mission, should you choose to accept it, is to tweak this
(or write corresponding functions) which produce output in a more
machine-readable format and then write a parser for it. Why? Once
that's done, it shouldn't be too hard to create an "undumper"
backend which reconstructs ops and SVs as it goes along (in which
case we have a compiler of sorts) or to to do post-processing of
the op tree (which paves the way for some high-level optimisations).
This suggestion will self-destruct in 5 seconds.
--Malcolm
--
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services