Bernhard Schmalhofer (via RT) wrote:
Hi,
this patch adds support for dynamic evaluation of 'Parrot abstract syntax
tree As Simple Text'. This was done be implementing the C-function
'ast_compile_past'.
Great, thanks.
Simple examples for dynamic executable PAST are in t/pmc/eval.t. The
toplevel node needs to be the new node 'PCC_Sub'. The node 'Py_Module' can't
be used, because it sets the pragma 'P_MAIN', which puts an 'end' opcode at
the end of the generated bytecode.
Using 'Function' as toplevel node would make much more sense, but I don't
know wether 'Function' is Python specific.
I don't know yet, But if it is, it should read PyFunc*
CU, Bernhard
Thanks, applied.
leo