Hi:
I create my private angelscript compiler (like the asBuild),
But it could recursively compile files in directorys.
After upgrading from 2.17.0 to 2.20.3, my compiler raise a new exception.
Which is the engine->importedFunctions index overflow.
The probloem is that, In angelscript, all imported functions will accumulate until engine destroy.
But my compiler will process 2~4 thounds file, which will cause the imported function index overflow(>0xFFFF).
I change a line in
void asCModule::InternalReset()
{
....
// Free bind information
for( n = 0; n < bindInformations.GetLength(); n++ )
{
[color="#ff0000"]engine->importedFunctions.RemoveIndex(bindInformations[n]->importedFunctionSignature->id & 0xFFFF);
// engine->importedFunctions[bindInformations[n]->importedFunctionSignature->id & 0xFFFF] = 0 ;
asDELETE(bindInformations[n]->importedFunctionSignature, asCScriptFunction);
asDELETE(bindInformations[n], sBindInfo);
}
....
}
And everything is OK.
But I amn't sure that if there is a side effect.
Thanks a lot.
imported function error
Ooh, what kind of project are you working on that has these many script files to compile? Looks like I'm missing some cleanup code for the importedFunction array. You're on the right track, but I'll verify if this is all that is necessary.
Ooh, what kind of project are you working on that has these many script files to compile? Looks like I'm missing some cleanup code for the importedFunction array. You're on the right track, but I'll verify if this is all that is necessary.
Thanks for your help.
I use your angelscript to develop private SDK.
Twenty RDs use this SDK to implement factory testing.
Actually , the total amount of angelscript in my project maybe 0.2 million.
Indeed. Wow.
I would be interested in seeing some profiling on the AngelScript compiler from that project. Would it be possible for you to provide that? I'm pretty sure there is very much that can be optimized in the compiler. I haven't put in much effort in making the compiler as fast as possible, as usually the scripts are quite small. But with this many scripts your application is probably spending quite a bit of time in the compiler.
I would be interested in seeing some profiling on the AngelScript compiler from that project. Would it be possible for you to provide that? I'm pretty sure there is very much that can be optimized in the compiler. I haven't put in much effort in making the compiler as fast as possible, as usually the scripts are quite small. But with this many scripts your application is probably spending quite a bit of time in the compiler.
Indeed. Wow.
I would be interested in seeing some profiling on the AngelScript compiler from that project. Would it be possible for you to provide that? I'm pretty sure there is very much that can be optimized in the compiler. I haven't put in much effort in making the compiler as fast as possible, as usually the scripts are quite small. But with this many scripts your application is probably spending quite a bit of time in the compiler.
Yes, I had do a bit optimization about preprocessor(it is base on angeljuice http://www.anticore.org/juce/angeljuice/)
But my compiler had binding with my library like a tight knot.
I will try to split that.
Thanks.
I've fixed this bug now. You can get the fix in the SVN revision 896.
Thanks,
Andreas
Dear Andreas:
I had been check the latest revision.
Yes, it had fix the imported function index,
but there is a new bug.
try this:
void name(uint8 a)
{
}
void main()
{
uint8[] name={1,2,3,4,5};
uint8 tmp;
name[1]=10;
name(tmp); //no matching signatures
}
if local variable name and the function name is ambiguous,
the compiler will report no matching signatures.
lobo
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement