Hi
Is it possible to use the JIT compiler with AngelScript 2.3? Sadly the blindmindstudios jit has not been updated since one year...
Anyone know if this is still in active development?
Thanks
James
Hi
Is it possible to use the JIT compiler with AngelScript 2.3? Sadly the blindmindstudios jit has not been updated since one year...
Anyone know if this is still in active development?
Thanks
James
It is likely that a few adjustments needs to be made to the JIT compiler to get it up to date with AngelScript 2.30.2. It shouldn't require a lot of changes though.
The team at BlindMind are most likely busy working on their next game, and haven't had the time to upgrade the JIT compiler yet. I'm sure they will do it eventually. Though if someone would provide the necessary updates to them I'm sure they will be more than happy to update their repository.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Ok thanks for the info. I dont know anything about writing a JIT compiler, or the backend of AS in general, so Im not sure trying to fix it myself would be a good idea. Perhaps some of the more experienced users from the community might want to tackle this...? heres hoping
I have the same issue but haven't had much time to work on it - so I am still using AS 2.29. As far as I remember there are two things here:
- the main issue is the signature change for CallSystemFunction (see this topic). This basically breaks the build.
- there will probably be a performance problem due to the new integer opIndex access instruction, since the JIT does not implement it (I guess it will fallback to the interpreter instead of using the older JIT path, which could be much slower).
I have tried to fix the first issue by pushing the variable on the stack but I lack knowledge about calling conventions on Windows, so it kept crashing (whereas it just worked on OSX). If someone is able to fix this and look at the other issue, it would be great!
I think several of us have tried and failed at one point or another. In my research half a year ago I found that there is only a few places that the changes are needed. But sadly I didn't know enough about AS or the JIT to make the changes. Recently I tried again, but other jobs got in the way. Maybe if we are extra polite Andreas himself will take a stab at it?
Maybe I will. :)
Though, really, I don't know if I would do a better job at it than anyone else. I haven't even gotten around to trying out the JIT compiler all this time that has been available.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I guess it could be a simple job for someone who knows how calling conventions work: the only real issue I had when I tried was to replace the one and only function call (CallSystemFunction) by its virtual assembly equivalent.
Maybe an intermediate solution would be to bring this function back to the new engine, and it would probably be much easier for anyone to fix the JIT.
I haven't even gotten around to trying out the JIT compiler all this time that has been available.
I think an official JIT project would actually be very beneficial, as AS is sadly known to be very slow compared to other scripting languages. JIT greatly reduces these problems. I know it requires a lot of effort and you are the only main developer (AFAIK), but there is already a good base in place.
Projects like GCC JIT could also be worth investigating as the base (would make VERY fast code), but it is also slowly developed.
There's a couple of reasons why we haven't updated the version of angelscript we use in our game engine (and thus haven't spent time updating the JIT to be compatible). Besides the obvious one being that we've released our game so there's no more active development to justify upgrading, a bunch of recent changes have also made the super hacky but functional system we created for doing python-style modules and imports with automatic dependency resolution no longer feasible, so we'd have to spend quite some time reimplementing that to work with newer angelscript versions. (Essentially, we just made it preprocess the files and directly inject object types and functions from one module into another, but the changes to how the internal reference counting and cleanup works make that no longer as easy as just adding stuff to the right array in asCModule)
I see there's a bunch of refactoring and API breakage/deprecation happening for 2.31. When that releases I might take a look at updating the JIT to be compatible again. Maybe I'll write an importing system done in a proper, non-hacky way so I can submit it upstream for inclusion as well. Seems like it could be fun.
AS is sadly known to be very slow compared to other scripting languages
Would you have any examples to back that up? Not that I doubt you, but I would very much like to see what performance bottlenecks people are experiencing so I can look into them, and make improvements.
I think an official JIT project would actually be very beneficial
I cannot argue against that. I'm certain it would be beneficial, the only problem with that is a time constraint I have. I really cannot assume more work. I only work on AngelScript on my spare time, and between my family and job this time is quite limited. I have to chose well what I can do on what little time I do have. I'm already only able to work on a small fraction of all the ideas I have for AngelScript as it is.
It would be a whole different matter if I could somehow make a living working on AngelScript, but that is not the case.
I see there's a bunch of refactoring and API breakage/deprecation happening for 2.31. When that releases I might take a look at updating the JIT to be compatible again. Maybe I'll write an importing system done in a proper, non-hacky way so I can submit it upstream for inclusion as well. Seems like it could be fun.
That would be fantastic. A lot of developers are asking for your JIT compiler to be updated :)
Version 2.31 ought to be released within the next couple of weeks. I'm finishing the updates to the documentation, and probably won't make any further code changes in this release (besides possible bug fixes).
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game