Jump to content
  • Advertisement
Sign in to follow this  
InvalidPointer

Bytecode platform independence

This topic is 2565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I went to test my x86 project build the other day and the bytecode loader puked on me (I precompiled the source using a 64-bit tool) and I recall hearing something about there being some platform dependencies in bytecode yet. Twofold queston: 1) Is this still the case, and 2) if it is, where should I start looking to fix this?

Share this post


Link to post
Share on other sites
Advertisement
http://www.angelcode.com/angelscript/sdk/docs/manual/doc_adv_precompile.html

The bytecode is still dependent on the pointer size on the platform it was compiled, but other than that there are no dependencies.

To remove this last dependency I'll most likely have to introduce new bytecodes that will be specific for pointers, and then the as_restore.cpp code needs to be modified to adjust the bytecode to adapt to pointer sizes and alignment of parameters on the stack when calling functions.

Share this post


Link to post
Share on other sites
I still like the idea of the platform independent intermediate bytecode that gets compiled back down to angelscript bytecode personally. Seems to me as if it would cause fewer issues as far as the instruction set is concerned. Then again, you know more about your project than I do.

Share this post


Link to post
Share on other sites
I would still have to deal with the same problems, that is adjusting the bytecode and alignment according to the platform.

I would only have to do it once though, but on the other hand I would have to keep two copies of the bytecode (both intermediate and final) if I wanted to allow the application to both save and execute the bytecode.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!