Jump to content

  • Log In with Google      Sign In   
  • Create Account

ThyReaper

Member Since 16 Feb 2012
Offline Last Active Today, 02:15 AM

Posts I've Made

In Topic: Removing @?

Today, 12:12 AM


One point I forgot to mention in my previous post was that the JIT Compiler appears to only support Windows and Linux? I am planning on targeting Windows, Mac and Linux. Do you know if the JIT Compiler would build and run on Mac?

 

I'm aware of at least one project on Mac that uses our JIT, though they use GCC. If you use a different compiler it might take a fair amount of work to add support for it.

 

Speaking of which, there was a minor change in the VM in version 2.29.2 that I released yesterday. Let's see how long it takes for ThyReaper to update the JIT compiler to reflect this wink.png

 

Looks like that change is simple enough to use a fallback for, at least temporarily. I'll also add native support for power operators at the same time.

 

Edit: While implementing the power ops, I noticed that overflow isn't detected when constants are resolved (e.g. 500 ** 3000 becomes 0 or #.INF depending, without printing a warning).


In Topic: Removing @?

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.


In Topic: AngelScript works in debug mode but not in release

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:

(void)0;

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 ); }

In Topic: Array not released

26 September 2014 - 11:25 AM

If 'myType' needs to be garbage collected, or might need to be garbage collected (not sure of the exact logic for arrays), the array will also be garbage collected. The GC will hold a reference to whatever was added to it until the GC decides it can be deleted.


In Topic: QtScript vs AngelScript

20 September 2014 - 08:30 PM

Array access in Angelscript is fairly slow, as each access is a function call. I believe Angelscript recently added fixed array access which would be a good fit for matrices, and should run much faster.


PARTNERS