Is it possible to save/load bytecode?
I have a need to be able to do this. Can it already be done or how must I go about doing it?
Thanks.
Sadly it's not currently possible, I would like to take a look at it some day. My initial thoughts are that the actual bytecode should be portable/relocatable however:
- Imported method addresses would need to be updated
- Constants would need to be saved/rebuilt. Not only just
const x=5but everything that is currently folded into a constant at compile time (5*5 is turned into25etc)
I see. Ok thanks. Please consider adding future support.
Also, I'm using Delphi (latest) and when I compiler there are a lot of warnings and hits.
This one too:
My first urge is to go in a fix them, but wanted to check with you first. I'm very new (as of yesterday) to this project, which from my initial testing, seems to work well in my project. All of those warning and hints each compile, worries me a bit. My code seems to run ok, but wanted to get your thoughts about them.
Sadly it's not currently possible, I would like to take a look at it some day. My initial thoughts are that the actual bytecode should be portable/relocatable however:
* Imported method addresses would need to be updated * Constants would need to be saved/rebuilt. Not only just `const x=5` but everything that is currently folded into a constant at compile time (5*5 is turned into `25` etc)
Aye, you would need three seperate areas in the binary format, the code (lape's opcodes), an area for constants that the code can address into (usually the constants in the code would just be offsets into this), and a address table for externals that the runner would populate.
Just to extend on one of these, where I know we get a lot of warnings: lpeval_functons.inc - The compiler will warn us as there is no explicit casting done by us - simply because we want to inherit however the parent compiler chooses to cast when mixing types.
A lot of these warnings is nothing to worry about, nothing to fix really. Maybe the deprecated methods can be replaced, but even here, it's fine.