Re: embedding initialization
Jeff Horwitz wrote: i'm neck deep in writing the IMC eval code for pugs. ... ... but i imagine there's a more elegant solution out there. t/src/compiler.t has now all the steps to run a PIR code string from C. It's not elegant though, because there are no APIs, but it should make things running. -jeff leo
Re: embedding initialization
excellent! now i can get rid of that silly no-op bytecode i've been using. thanks for the quick turnaround, leo. -jeff On Thu, 5 May 2005, Leopold Toetsch wrote: Jeff Horwitz wrote: i'm neck deep in writing the IMC eval code for pugs. ... ... but i imagine there's a more elegant solution out there. t/src/compiler.t has now all the steps to run a PIR code string from C. It's not elegant though, because there are no APIs, but it should make things running. -jeff leo
embedding initialization
i'm neck deep in writing the IMC eval code for pugs. if i've already loaded bytecode using Parrot_readbc/loadbc, i can then successfully call the PIR compiler and eval code at will from C/Haskell. great! however, without the Parrot_readbc step, everything bombs out because the packfile isn't set up correctly. and after looking at packfile.c and embed.c, it's obvious there's a lot more i need to do than just creating a new packfile. do we have the ability to do this right now or should there be another function that performs this initialization for us? we'll most certainly need this for things like perl -e one-liners. in the short term, i can use a no-op .pbc file to bootstrap with, but i imagine there's a more elegant solution out there. -jeff
Re: embedding initialization
Jeff Horwitz wrote: i'm neck deep in writing the IMC eval code for pugs. if i've already loaded bytecode using Parrot_readbc/loadbc, i can then successfully call the PIR compiler and eval code at will from C/Haskell. great! however, without the Parrot_readbc step, everything bombs out because the packfile isn't set up correctly. and after looking at packfile.c and embed.c, it's obvious there's a lot more i need to do than just creating a new packfile. I'll try to create a source test (e.g. t/src/compiler.t) with the necessary steps. It will probably need some clarification in which of embed.h | extend.h (if any) such APIs should go. -jeff leo