Version 2.38.0 - 2025/08/08
Bug fixes
- Use of computed gotos on gnuc and clang was not enabled by default (Thanks Asu)
- Fixed crash in context if the engine was shutdown while a context was still suspended
- Fixed assert failure in compiler when trying to initialize an ashandle type with a value type (Thanks Miss)
- Fixed crash in compiler when compiling value assignment to null handle (Thanks Sam Tupy)
- Fixed parsing of declaration of global variable initialized with a template that takes multiple subtypes (Thanks Patrick Jeeves)
- Fixed crash when initializing global variable of scoped type declared with direct construct call
- Fixed compilation global variable initialization with assignment so value doesn't have to be copied (Thanks Patrick Jeeves)
- Fixed some compilation errors in as_callfunc_arm64_msvc.asm (Thanks Manuel Lauss)
- Fixed crash in GetThisPointer on contexts with nested state (Thanks Patrick Jeeves)
- Fixed compiler warning on fallthrough statement in as_context.cpp (Thanks Thomas Degener)
- Fixed crash when doing implicit conversion from value type to ref type for a function argument expecting reference to handle (Thanks Sam Tupy)
- Fixed crash when compiling script attempting to declare variable with type auto[] (Thanks Sam Tupy)
- Explicit copy constructor is no longer used implicitly by compiler (Thanks Patrick Jeeves)
- Fixed memory invasion that could happen if a context was reused after the stack had grown (Thanks Doi Hiroshi)
- Fixed crash when passing function pointer without @ prefix to argument expecting asOBJ_ASHANDLE (Thanks johannesg)
- Fixed incorrect attempt to convert to null handle in ternary condition (Thanks ezio416)
- Fixed assert on invalid assign with literal constant (Thanks Miss)
- Fixed handling of stack pointer for variadic functions (Thanks Paril)
- Fixed use of auto@ in foreach loop (Thanks Paril)
- Fixed incorrect reference count management in the library for template functions (Thanks Paril)
- Fixed invalid loop in FindNextFunctionCalled that could read out of bounds (Thanks Paril)
- Fixed compilation error in as_callfunc.cpp on gcc 12 (Thanks Klaus Silveira)
- Fixed crash in asIScriptGeneric::SetReturnObject for variadic functions (Thanks Programier)
- Fixed crash in bytecode loader when it tries to translate a list factory in invalid bytecode (Thanks Peter Wester)
- Fixed crash in compiler when attempting to use template function without informing the subtypes (Thanks Paril)
- Fixed invalid bytecode when passing function pointer to functions expecting ?& (Thanks Paril)
- Fixed error for invalid scripts attempting to pass anonymous functions to functions expecting ?& (Thanks Paril)
- Fixed lookup of template subtypes when registering child funcdefs with different namespace set (Thanks Remy Stivani)
- Fixed crash in CreateScriptObject with asCALL_CDECL_OBJFIRST|LAST and auxiliary pointer (Thanks bhair)
- Fixed issue in asIScriptModule::SetDefaultNamespace with nested namespaces (Thanks Programier)
- Fixed implicit conversion to value type when the expression is a const of the same value type (Thanks Jan Krassnigg)
- Fixed invalid access of inherited member before it is initialized by parent constructor (Thanks Sam Tupy)
- Fixed crash on compiling function with funcdef by value as parameter type (Thanks Sam Tupy)
- Fixed saving bytecode with template functions (Thanks killermud1)
- Removed compiler error on using temporary object as lvalue in value assignment
- Fixed crash in GetAddressOfVar for object variables whose stack position is reused in multiple scopes (Thanks Paril)
- Try/catch now properly restores the stack pointer on exceptions (Thanks Miss)
- Fixed variadic in constructor/factory (Thanks Paril)
- Fixed out of bounds access in GetDeclaredAt (Thanks Paril)
- Fixed incorrect function overload matching with &out parameters when parameter type cannot be implicitly converted to argument type (Thanks Paril)
- Fixed issue with builder not finding the inherited class if 'using namespace' was used (Thanks Sam Tupy)
- Fixed saving/loading bytecode with calls to variadic functions (Thanks Paril)
- Fixed issue with ?& arguments in native 32bit arm hard float calling conventions (Thanks Konstantin Taunder)
- Fixed issue with returning a structure of 4 floats by value in native 32bit arm hard float calling conventions (Thanks Konstantin Taunder)
- Fixed premature release of class factory when discarding a module with a shared class declared within a namespace (Thanks Miss)
- Fixed use of auto in foreach loop which should use handle if possible (Thanks Miss)
- Fixed crash with ternary operator yielding reference to object handle and passed to function argument (Thanks romanpunia_gd)
- Fixed crash due to aggressive bytecode optimization with ternary operator that set global variables in the result (Thanks Miss)
Library
- Implemented support for registering template functions with RegisterGlobalFunction and RegisterObjectMethod using generic calling convention (Thanks MindOfTony)
- Included a new function type asFUNC_TEMPLATE to indicate the template functions
- Added engine property asEP_MEMBER_INIT_MODE to allow backwards compatiblity for how class members are initialized
- Added engine property asEP_BOOL_CONVERSION_MODE to enable or disable contextual conversion to bool
- Added engine property asEP_FOREACH_SUPPORT to allow turning off the foreach loops for backwards compatibility
- Implemented support for registering functions with variadic arguments using generic calling convention (Thanks HenryAWE)
- Removed unnecessary spaces in default argument expression returned with asIScriptFunction::GetDeclaration (Thanks Jan Krassnigg)
- asIScriptContext::GetVar now returns in the type modifiers if the variable is const (Thanks Paril)
Library interface
- Deprecated GetStringFactoryReturnTypeId, and implemented GetStringFactory instead (Thanks HenryAWE)
- Included GetSubTypeCount, GetSubTypeId, GetSubType to asIScriptFunction for template functions
- Changed the destructor of asIScriptFactory to public as it doesn't have to be reference counted (Thanks Jan Krassnigg)
- asITypeInfo::GetProperty now returns info on constness (Thanks Paril)
- SetTranslateAppExceptionCallback, SetLineCallback, SetExceptionCallback now take asSFuncPtr by ref for consistency (Thanks HenryAWE)
- Added GetMessageCallback (Thanks Sam Tupy)
- Changed the return values for GetStateRegisters and GetCallStateRegisters to indicate when a context is in an invalid state
- Deprecated asIScriptFunction::GetScriptSectionName, use GetDeclaredAt instead
Script language
- It is now possible to instantiate registered template functions and call them (Thanks MindOfTony)
- A class member can now be explicitly initialized in the class constructor, overriding the initialization defined in the declaration (Thanks Patrick Jeeves)
- Implemented contextual conversion to bool in conditions and boolean operations (Thanks HenryAWE)
- Implemented support for foreach loops (Thanks HenryAWE)
- Implemented support for using namespace (Thanks Programier)
Add-ons & Samples
- Made parseFloat in std::string add-on threadsafe (Thanks gjl)
- Fixed issue in script builder with metadata for variable declarations using direct object initialization (Thanks Miss)
- Implemented a script socket add-on
- asrun can now use sockets to setup a simple server, or connect to remote sockets
- Fixed crash in CScriptBuilder when parsing metadata in namespaces declared with nested scope on single line (Thanks Programier)
- Added get_weekDay to datetime add-on
- Implemented a string::regexFind method for the std::string add-on
- Implemented support for foreach on script arrays and dictionary
- Implemented format and scan with variadic args for std::string add-on (Thanks HenryAWE)
- The any::retrieve methods were not registered as const (Thanks Paril)
- Fixed bug in script builder that didn't clear metadata from previous builds (Thanks Svenvh)
Project
- Fixed cmake project for compiling on Risc-V 64bit (Thanks Vixea 0)
- Made installing the library optional in the cmakefile (Thanks 1vanK)
- Added support for native calling conventions on Linux with MCST E2K 64bit CPU (Thanks Denis Drakhnia)