AngelScript 2.25.2 is out

Started by
5 comments, last by WitchLord 11 years, 4 months ago
As promised with the previous release, this new version includes all the stuff that I didn't have the time to implement for version 2.25.1.


Most of the bytecode optimazations are now done locally for each statement that is compiled. This reduces the search time for uses of temporary variables. With this the compilation time should be close to linearly proportional to the size of the source code.

I've enhanced the bytecode optimizations to remove some more redundant code. Especially some common instruction sequences that would make unnecessary work on object handles has been improved a lot.


The engine has been improved to avoid notifying the garbage collector of internal objects, e.g. functions, object types, and properties, when it is known that they are still in use. This will reduce the amount of time the gc spends trying to detect garbage for these kind of objects, and thus allow it spend that time elsewhere.

Finally the script language has received an enhancement. The mixin classes can now implement interfaces. When a class includes a mixin class that class will also implement all the interfaces that are in the mixin class.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
before

Script Read time: 6ms
Script Compile time: 757ms


after

Script Read time: 6ms
Script Compile time: 689ms


for about 5k lines.
Thank you.

Engine also caught a few duplicate method registrations, it wasnt able to do that in 2.25.1
I'm glad you see an improvement, even though it is only 10%.

Most users probably won't notice a big difference as the slow compilation times only happened with very large functions (thousands of lines) with lots of conditional code in it. If the functions are broken down to more reasonable sizes of at most hundreds of lines in each, then the problem wasn't noticeable.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Compilation time on Core 7i 3.44 Ghz

230 kb script codes.
Total lines: 12166

before : 205 ??
after : 192 ??
<p>Ran into a minor problem compiling for MSVC 2008 with AS_NO_THREADS defined.

1>as_thread.cpp
1>..\..\source\as_thread.cpp(75) : error C2220: warning treated as error - no 'object' file generated
1>..\..\source\as_thread.cpp(75) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>..\..\source\as_thread.cpp(81) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>..\..\source\as_thread.cpp(87) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>..\..\source\as_thread.cpp(93) : warning C4390: ';' : empty controlled statement found; is this the intent?

Removing the \WX (treat warnings as errors) property fixed the error for me.EDIT: Awesome. I see you've added namespaces! (well they are new to me) smile.png
EDIT2: What am I doing wrong here?
r = engine->SetDefaultNamespace("input"); assert( r >= 0 );
r = engine->RegisterGlobalFunction( "::joystick@ get_joystick(int)", asFUNCTION(Input::GetJoystick), asCALL_CDECL); assert( r >= 0 );
r = engine->SetDefaultNamespace(""); assert( r >= 0 );

script:

input::joystick[0]; //input is undeclared.
The problem with AS_NO_THREADS has already been fixed in the WIP. Thanks anyway.

There is a problem with namespaces and property accessors. I've not yet had the time to investigate this problem properly.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

The problem with the global property accessors and namespaces has been fixed in revision 1492.

Let me know if you find any further problems.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement