Advertisement

First fully functional JIT compiler for AngelScript available

Started by February 15, 2012 10:28 PM
13 comments, last by Arthur Valitov 12 years, 3 months ago


IMO you should just call SetJITCompiler(NULL);

/f


I don´t know if that´s a good idea - it should work only if Angelscript checks the jitCompiler pointer for NULLness and act accordingly.

Alternatively you could store the jitcompiler as the script engine's user data, and register a cleanup function with the engine to delete the jitcompiler when the engine is deleted.


The problem I see with this approach is that since one JIT compiler can serve many engines (Blind Mind Studios´ does) in a multi engine scenario it would be a problem to decide which of the engines has to delete the jitCompiler. So I still think that making the JIT a reference counted object might solve all that issues - the engines themselves would release such references when it is safe to do so. Of course the programmer should remember to release the original reference (the one created when he JIT was first constructed).
Advertisement
I tried to add this JIT compiler to my project and got may errors with std::function in MSVC 9 in as_jit.cpp .. Could you say me what I am doing wrong?
JIT needs c++11. lambda, auto, function
vc9 not supported.
saejox, thank you! you are opened my eyes, really)

This topic is closed to new replies.

Advertisement