Would independent bytecode in one platform be possible?

Started by
1 comment, last by loboWu 15 years, 8 months ago
In my system, I create a Library, which is a static library of registered class & global functions . And there are an angelscript-compiler, linking with the Library, which could compile script code then save it as bytecode. In my runtime environment, I design a UI, linking with the same VM library, to execute the bytecode. All the registered functions and types in the Library wouldn't change, but the type property and member function will extend. (that is , the global function pointer will change, and the offset of class property will change.........) Is there any possible, If I compile script with older Library, and execute it with newer Library? I knwo that, independent bytecode with different platform is difficult, But the independent bytecode with the same registered enviroment will be easier, since you could use lookup table of registered type. It may be slow down the performance, but it will be practicality. Thanks a lot.
Advertisement
It would be quite prone to errors, trying to make this work properly. It can certainly be done, but I'm not sure it is really worth it.

Why is that your compiler doesn't have the same interface as the application that will use the pre-compiled scripts?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

All datas are stored in pre-compiled scripts, everywhere.....
and those wouldn't be changed.
Those datas are huge, wasting a lot of compiling time.
(They are not only pure data, may contain equations, calling functions.....
You can think they are just a lot of Win32 DLL, run on-demand
)


But the execution environment maybe change the flow-logic, data-layout, making bug-fix......

I am looking for a solution to achieve the goal of "compile once, and run in different layout/logic".

Thanks a lot.

This topic is closed to new replies.

Advertisement