I tried the AOT compiler however it produces hundreds of gigabytes (not joking) of c++ code. You can imagine that is useless.
Most of the code I'd like to translate is pretty straightforward. For example, here you just need to change @ to *.
void onTick( CMap@ this )
{
// local player check end
CBlob@ localBlob = getLocalPlayerBlob();
if (localBlob !is null)
{
if (!myPlayerGotToTheEnd && (localBlob.getPosition() - endPoint).getLength() < 32.0f)
{
myPlayerGotToTheEnd = true;
Sound::Play("/VehicleCapture");
}
}
There might be a problem with virtual classes and such. But I purposfully avoid using AS specific things like traits.
The file size of these translations won't be small too, because I imagine all the global vars and functions need to be in one common header attached to every single translated script, however it won't be anywhere near a couple gigs.

I'm sporting the idea of having a Angelscript to C++ automatic translator. I know it's not an easy task and not everything can be translated, however I have an idea how to do it. Is anyone interested working on this with me as a paid job?

Visual Studio 2010
Angelscript 2.26.2
The crash happens on next map (after resources are freed, and only in the release mode). I'm not sure now this is the reason for the crash, so lets leave it.
However I have a memory leak (might be related) and I need some help figuring out what causes this.
The leak happens on every single script in the game. What do you think it is leaking ?
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_builder.cpp (3529): (Module name unavailable)!asCBuilder::GetParsedFunctionDetails + 0x14 bytes
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_builder.cpp (3595): (Module name unavailable)!asCBuilder::RegisterScriptFunctionFromNode
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_builder.cpp (658): (Module name unavailable)!asCBuilder::RegisterNonTypesFromScript + 0x1E bytes
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_builder.cpp (569): (Module name unavailable)!asCBuilder::ParseScripts
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_builder.cpp (231): (Module name unavailable)!asCBuilder::Build
d:\transhuman\kag\3rd\angelscript\sdk\angelscript\source\as_module.cpp (222): (Module name unavailable)!asCModule::Build + 0xB bytes
d:\transhuman\kag\trunk\scripting\angelscript\add_on\scriptbuilder\scriptbuilder.cpp (651): (Module name unavailable)!CScriptBuilder::Build + 0x17 bytes
d:\transhuman\kag\trunk\scripting\angelscript\add_on\scriptbuilder\scriptbuilder.cpp (143): (Module name unavailable)!CScriptBuilder::BuildModule
d:\transhuman\kag\trunk\scripting\asscript.cpp (201): (Module name unavailable)!asScript::loadScript + 0xB bytes
d:\transhuman\kag\trunk\scripting\asscriptmanager.cpp (371): (Module name

Hey,
I need to recompile a script during runtime which has a shared class or shared function. Angelscript doesn't discard those in DiscardModule(). How do I get rid of them at runtime so I can recompile?

I made a smaller case and found the issue. The JIT compiler doesn't work with virtual functions. Whenever there was a virtual function binding in my engine it crashed with a heap corruption after that. ThyReaper did you know about this?
I made some benchmarks after I made it work and they were quite disheartening. Running with the JIT compiler is actually SLOWER than without it. Did anyone do benchmarks of their own with JIT on/off?