• Advertisement
Sign in to follow this  

AngelScript 2.28.2 is out

This topic is 1392 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Anonymous objects? Is that anything like in C#?

 

var obj = {
    str = "a string",
   num = 100
};

Share this post


Link to post
Share on other sites

It's something like this:

 

void main()
{
  doSomethingWithArray( array<int> = {1,2,3,4,5,6} );
  doSomethingWithDictionary( dictionary = {{'apple', 1}, {'banana', 2}, {'orange', 3}} );
}

 

It's no longer necessary to first declare and initialize a variable, in order to use it in an expression.

Share this post


Link to post
Share on other sites

Great! Thanks for the opCall addition. Haven't had time to check it out yet (still running my patched 2.28!)

Share this post


Link to post
Share on other sites

By the way, is there any change in the bytecode that would require a new version of the JIT that worked with 2.28.0?

Share this post


Link to post
Share on other sites

There shouldn't be any changes in this version that break the compatibility with the JIT compiler from BlindMind studios. Though, I can't make any guarantees on that as I don't use the JIT compiler myself.

Share this post


Link to post
Share on other sites

Thanks. The fact that there are new bytecode instructions  in 2.28.1 does not impact existing JIT compilers? (I am not sure how JITs and angelscript handle this)

Share this post


Link to post
Share on other sites

Our JIT falls back to Angelscript execution if it doesn't know a specific bytecode, so it will keep working as long as no existing bytecodes were changed. This can cause a performance hit.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement