Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Feb 2012
Offline Last Active Dec 02 2014 03:14 AM

#5188442 Removing @?

Posted by on 21 October 2014 - 09:06 PM

I have seen Blind Mind's JIT Compiler, but I was under the impression that it wasn't much supported any more? They don't seem to update it anymore, so I didn't think it was safe to use something that could become broken when a new version of AngleScript is released as the JIT Compiler would need to be kept up-to-date with every new version of AngelScript, right? It shows the last update to the JIT Compiler was for AngelScript v2.27, which is over a year old now. Not to mention if there was a bug, and nobody is around to fix it, then it kind of leaves you on your own. I consider myself a seasoned C++ programmer, but unfortunately not good enough to try and fix a bug in the JIT Compiler if one existed, or to try and keep it up-to-date with AngleScript if I was to use it.


There are relatively few changes to Angelscript that require us to update the JIT. Most changes affect how the bytecode is assembled, rather than what a specific bytecode does. When new bytecodes are added, the JIT also falls back to Angelscript execution so it can continue to work. Most bytecode changes are relatively simple and I can easily keep it up to date.


Due to this, the last updated version is just a guarantee of what version works, not an indicator that other versions don't work.

#5185193 AngelScript works in debug mode but not in release

Posted by on 05 October 2014 - 04:29 PM

If you're not using a custom assert(), then lines like

assert( pEngine->RegisterObjectType("CScriptComponent2d", 0, asOBJ_REF|asOBJ_NOCOUNT) > -1 );

Turn into something like this in release:


Asserts are intended to only be run in debug code.


I suggest rewriting your lines like this:

{ int r= pEngine->RegisterObjectType("CScriptComponent2d", 0, asOBJ_REF|asOBJ_NOCOUNT); assert(r > -1 ); }

#5160324 Performance

Posted by on 13 June 2014 - 10:56 AM

I'm not aware of any recent benchmarks compared to LuaJIT, but in the project I work on, using our JIT (https://github.com/BlindMindStudios/AngelScript-JIT-Compiler), we typically achieve performance roughly 2x-3x slower than comparable C++, and at least 2x faster than general AngelScript, with specific tasks going much faster and almost as fast as native C++.

#5109392 Weird construct behaviour using asMETHODPR

Posted by on 15 November 2013 - 03:37 AM

asBEHAVE_FACTORY cannot be implemented as a method, it must be implemented as a global function. If you have only a single ScriptingManager, you can probably implement it as asCALL_THISCALL_ASGLOBAL. If you have multiple ScriptingManager instances, you'll need to move this factory behavior to be a normal method on that class.

#4967546 AngelScript 2.24.1 is released

Posted by on 08 August 2012 - 03:51 PM

The JIT was broken (mostly by the new nested context feature, the member name change was very minor). I fixed it a day ago, but forgot to commit the changes. If you update, you'll be compatible with 2.24.1.

#4958840 Syntax question by (relative) newbie

Posted by on 13 July 2012 - 10:55 AM

Making arrays of const handles isn't possible in the version of the AngelScript engine we used. It will be possible if we update to the newest engine by creating an array<const subSystemDef@>.

#4945172 CScriptAny and [ ] operator, Questions about ref counting

Posted by on 31 May 2012 - 08:35 PM

When you receive a handle, it has already been grabbed. When you return a handle, it needs to be grabbed before being returned. If you use auto-handles ( @+ instead of @ ), your current code should work, but will be a bit slower than doing it yourself.