Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Dan Sugalski <[EMAIL PROTECTED]> wrote: >> To make this actually work we need some standards, and the ability to >> embed bytecode segments into an executable (like, say, parrot :) so >> they're always at hand.
> The attached patch implements one (evil) way to do this. Too evil. No constants, no metadata, a special function to call the code. BTW a similar approach is already in the tree, this is embed.c:Parrot_run_native(). Passing a second incarnation the bytecode would do it. But, we should do the right thing: * a PackFile is a PMC (needed e.g. for "eval" anyway) * the binary representation is a frozen PackFile So, pbc2cc.pl needs just to hexify that image. And the entry point should of course be just a Parrot Sub. WRT namespace, we can attach it to either the Library or the ParrotInterpreter PMC. So we could do: $P0 = getinterp $P1 = $P0."_lib_loader"(args) runtime/parrot/library/parrot_lib.imc is a starting point for the functionality, but should be rewritten to use OO and a modular approach. Static configuration should be embedded as a frozen image, as outlined in a mail a few days before the last release. leo