AngelScript Change Log
Version 2.8.0a - 2007/02/18
- Bug fixes
- Fixed memory leak with exception handler inside script class method
- Fixed the DELETEARRAY macro that didn't work on gnuc (Thanks Jeremy "droz" Harmon)
- Library
- Improved the memory management facility
- Added the config option AS_NO_USER_ALLOC. Define this to turn off the user defined memory
managements. The default memory management in the library may not be compatible with all compilers yet. By
defining this macro when you compile the library, you should be able to use the library anyway, though
without the functionality of asSetGlobalMemoryFunctions().
- Project
Version 2.8.0 - 2007/02/04
- Bug fixes
- Fixed incorrect use of temporary variables during evaluation of function argument expressions (Thanks Gilad Novik)
- Fixed error with exception handler inside script class method (Thanks Anders "Dentoid" Stenberg)
- Library interface
- Added Set/GetEngineProperty() that will allow you to dynamically changes some settings that previously required a recompilation of the library.
- ALLOW_UNSAFE_REFERENCES is now an engine property instead of a compile time flag.
- Removed some deprecated functions.
- Added GetArgPointer() and GetReturnPointer() to asIScriptContext and asIScriptGeneric.
- Removed the SetCommonObjectMemoryFunctions() from the script engine.
- Added the global SetGlobalMemoryFunctions() and ResetGlobalMemoryFunctions().
- Added SetUserData() and GetUserData() to the context interface (Thanks Steve Williams)
- Library
- Fixed a lot of compiler warnings (Thanks Manu Evans)
- All dynamically allocated memory now uses the memory functions registered with SetGlobalMemoryFunctions.
- By changing the asCString implementation I was able to decrease the number of memory allocations by 15%.
- Script language
- Deprecated the bits type. All bitwise operators are now performed on the uint type. There is no longer any bitwise conversion of float to uint.
- Added the int64 and uint64 types.
- The this keyword is now optional when accessing class members from within a class method.
- Object constructors can now be used to perform implicit conversions in expressions.
- Virtual machine
- New byte codes:
i64TOi, uTOi64, iTOi64, fTOi64, dTOi64, fTOu64, dTOu64, i64TOf, u64TOf, i64TOd, u64TOd,
NEGi64, INCi64, DECi64, BNOT64,
ADDi64, SUBi64, MULi64, DIVi64, MODi64,
BAND64, BOR64, BXOR64, BSLL64, BSRL64, BSRA64
CMPi64, CMPu64
- Project
- Added as_memory.h, as_memory.cpp, and as_objectarray.h
Version 2.7.1b - 2006/12/03
- Bug fixes
- Save/load of bytecode followed by ExecuteString() that called one of the script functions failed during compilation. (Thanks coollofty)
Version 2.7.1a - 2006/11/04
- Bug fixes
- Constant bits8 and bits16 variables didn't work properly (Thanks Cheetah3d)
Version 2.7.1 - 2006/11/02
- Bug fixes
- Minor bug fix with an incorrect error message (Thanks Alraz)
- Empty switch statements would crash the compiler (Thanks the_bateman)
- Registering global properties didn't update a cache in compiled script modules, sometimes invalidating pointers (Thanks Anthony Rufrano, a.k.a "paradoxnj")
- Fixed compiler differences for 64bit integer constants
- Fixed some compiler asserts (Thanks Anders Hansson)
- The index operator on handles to array objects didn't work (Thanks Anders Hansson)
- The compiler would crash if a script class inherited from an undeclared type (Thanks Anders Hansson)
- The compiler incorrectly reused temporary variables (Thanks MrC_XBMC)
- Library
- The non-reserved tokens, any, from, and this, are now also defined in the as_tokendef.h file (Thanks Deyja)
- Adjustments have been made to make the library indepentent of CPU memory layout of words. This if for PPC. (Thanks Edward Rudd)
- Cleaned up as_config.h to make it easier to maintain
- Changed compiler to do proper conversion between types of different sizes, for the sake of big-endian CPUs.
- Script language
- Added the reserved keyword 'cast'
- Support for dynamic casts between object handles with cast<type>(expr)
- Virtual machine
- Added byte codes iTOb, iTOw, SetV1, and SetV2 to support big endian CPUs
- Added byte code Cast for dynamic casts of object handles
Version 2.7.0 - 2006/07/23
- Bug fixes
- Fixed a problem with script classes and multiple modules where the engine failed to find the class methods (Thanks Dentoid)
- Fixed bug where an assert fails when the operands for an assignment has compiler errors (Thanks Dentoid)
- Parser entered endless loop if the script ended before closing the class declaration (Thanks Dentoid)
- Parser entered endless loop if a method declaration had syntax error (Thanks kunitoki)
- Fixed assert hit for some compiler errors (Thanks kunitoki)
- Discard() would remove array types from the configuration, leading to failure in following builds (Thanks loboWu)
- Fixed bug with the any type and AS_MAX_PORTABILITY
- Fixed bug with AS_MAX_PORTABILITY and script classes that were not constructed properly
- Fixed a bug with the bytecode optimization for 64bit processors
- Fixed some bugs with the internal array object and AS_MAX_PORTABILITY and AS_64BIT_PTR
- Fixed bug with null value and AS_64BIT_PTR
- Fixed some bugs in the virtual machine on 64bit processors
- Added check to see if script property has a size 0 (Thanks Maddi)
- Library interface
- The engine methods GetMethodCount(), GetMethodIDByIndex(), GetMethodIDByName(), and GetMethodIDByDecl() were changed to take the typeId instead of the module name and object type name. This makes it unnecessary to know the module if you only have the type id, and it is also much more efficient.
- Added methods RegisterInterface() and RegisterInterfaceMethod() that allow the application to register a script interface which can be passed to the application
- Added method GetFunctionModule()
- Deprecated the methods GetModuleIndex() and GetModuleNameFromIndex()
- Added GetVarTypeId() to the context interface
- Replaced SetCommonMessageStream() with SetMessageCallback() which is more flexible in that it receives a structure with info instead of a string
- asIOutputStream is removed
- Added asGetLibraryOptions() which returns a string with the compile time options. Mostly used for testing.
- Library
- Applied changes to make the library work better with 64bit platforms (Thanks Yiannis Mandravellos)
- Fixed a couple of compiler warnings (Thanks Alraz)
- Added support for native calling conventions on MIPS processors. (Contribution by Manu Evans)
- Added first support for native calling conventions on PPC processors. (Contribution by Pecan Heber)
- Unified the way registered functions and script functions are stored in the engine
- Improved performance of Prepare() when using the same function as last Prepare()
- Script language
- Added new token 'interface'
- Semi-colon after class declaration is now optional
- It's now possible to declare interfaces in the scripts
- Added support for the '\t' escape sequence in strings. (Thanks Lbas)
- Deprecated the keyword 'struct' in the script language
- Virtual machine
- Added bytecode CALLINTF which resolves interface methods to the real class method
- Project
- Added as_callfunc_mips.cpp
- Added as_callfunc_ppc.cpp
Version 2.6.0 - 2006/04/08
- Bug fixes
- Fixed a bug with RegisterGlobalProperty() (Thanks loboWu)
- Type conversions may now be used in initialization of global variables. (Thanks iram)
- Script language
- It's now possible to define class methods and constructors for the script declared structures. The definition of the method must be written inside the struct declaration.
- The this keyword can be used to access the object and its members from within the class method. It's not yet possible to access the struct members without using the this keyword.
- Added the keyword 'class' as synonym for 'struct'
- For &inout parameter references the 'inout' keyword is now optional
- Only object types that support object handles can now use the &inout parameter references. Other types must use &in or &out, unless AS_ALLOW_UNSAFE_REFERENCES is defined.
- Added the reserved keyword: int64. Currently this is only used internally, but in time it will be a fully implemented primitive.
- Library interface
- Removed the deprecated version of the Build() method.
- Added SetArgAddress() and GetReturnAddress() methods to the context interface. These should be used to handle references
- Added GetArgAddress() and SetReturnAddress() methods to the generic interface.
- Changed AddScriptSection() to accept a size_t for the script length instead of int
- Improved the way the [Set|Get][Arg|Return][Address|Object]() methods work.
- Added the method SetObject() to the context for calling object methods
- ExecuteString() now adds a line break after the given string. This allows for one-line comments to be used without producing an invalid script. (Thanks B_old)
- Added the methods GetMethodCount(), GetMethodIDByIndex(), GetMethodIDByName(), and GetMethodIDByDecl() that should be used to obtain the function id for a script declared class method.
- Library
- Fixed a lot but not all of the compiler warnings that MSVC8 reports for 64bit incompatibilities.
- If native calling conventions are not supported for the target platform, then AS_MAX_PORTABILITY will automatically be defined to allow compilation of the library. (Thanks mandrav)
- Added a new compiler flag AS_64BIT_PTR, which should be defined for 64bit platforms. Ideally the as_config.h file should automatically set the flag according to the target platform. When this flag is defined, all pointers will be stored in the bytecode as 64bit words.
- Made improvements to better handle 64bit platforms
Version 2.5.0c - 2006/02/16
- Bug fixes
- Using named constants, i.e. variables declared and initialized with constants, would in certain situations give the wrong value. (Thanks Villemon)
- Added null checks to fix memory access failure related to dynamic configurations. (Thanks mandrav)
- Project
Version 2.5.0b - 2006/01/31
- Bug fixes
- Comparison with object handle in a local variable produced incorrect byte code. (Thanks Villemon)
- A bug in the VM for the BC_ChkNullV byte code caused script exceptions when using asCScriptString compiled with VC++ 2005. (Thanks topcatse)
- When releasing the engine, the internal resources were released in the wrong order, causing assert failures in the memory manager with VC++ 2005.
- The assignment operator for the internal type 'any' wasn't properly registered, causing memory management problems.
- Global variables were not initialized properly when loading pre-compiled bytecode. (Thanks Villemon)
Version 2.5.0a - 2006/01/20
- Bug fixes
- Using assignment behaviours that took a reference as &inout with asALLOW_UNSAFE_REFERENCES would crash the application. (Thanks Deyja)
- Using the default constructor for script structures to create temporary objects didn't work.
Version 2.5.0 - 2006/01/12
- Bug fixes
- asCALL_CDECL_OBJLAST that returned objects by value didn't work correctly (Thanks Deyja)
- Script language
- Primitive types can be implicitly converted to a reference of another primitive type for function calls. This is something C++ doesn't accept.
- Parameter reference specified as &inout no longer copies the value. The argument is only computed once. The function receives a reference to the true value. Expressions where the reference cannot be guaranteed during the execution of the function generates a compiler error. The value must then be copied to a local variable instead.
- Added support for character literals.
- Library interface
- Overloaded operators may now use &inout references. Since this type of references now guarantees a pointer to the true object this is useful if the operand has to be modified, e.g. a stream class.
- Overloaded operators may now use &out references. The order of evaluation will change, but precedence order is kept.
- Added functions to the asIScriptContext interface that allow the application to enumerate variables on the stack and examine their values. (Thanks Ivan Marinov)
- Library
- A couple of minor code changes to make it easier to compile the library on Metrowerks CodeWarrior for NintendoDS (Thanks Fumihiro KanaYA)
- The script compiler was changed to generate less copies of objects when doing function parameters by reference.
- Added a new compile time flag: AS_ALLOW_UNSAFE_REFERENCES. When this is defined the library will allow parameter references without the in, out, or inout keywords. These parameters references will also work just like normal C++ parameter references, without any restrictions.
- Virtual Machine
- The VM has been changed to use three op instructions instead of stack based instructions. In some situations the new VM is faster, in others it is about the same.
- Project
Version 2.4.1e - 2006/02/04
- Bug fixes
- When releasing the engine, the internal resources were released in the wrong order, causing assert failures in the memory manager with VC++ 2005.
- The assignment operator for the internal type 'any' wasn't properly registered, causing memory management problems.
- asCALL_CDECL_OBJLAST that returned objects by value didn't work correctly (Thanks Deyja)
- Global variables were not initialized properly when loading pre-compiled bytecode. (Thanks Villemon)
- Using the default constructor for script structures to create temporary objects didn't work.
- Comparison with boolean values resulted in the value -1 instead of 1.
Version 2.4.1d - 2005/12/09
- Bug fixes
- The compiler didn't raise an error when doing an handle assignment where the lvalue was a normal object (Thanks Lbas)
Version 2.4.1c - 2005/11/22
- Bug fixes
- Overloaded indexing operators that take an object as parameter and returns a reference, crashed the application when compiling the script. (Thanks Desdemona)
Version 2.4.1b - 2005/11/08
- Bug fixes
- Chained expressions with overloaded operators and registered types could cause null pointer violations (continued) (Thanks __Avatar__)
Version 2.4.1a - 2005/10/18
- Bug fixes
- Registering global properties, after removing a config group with global properties, caused a null pointer violation. (Thanks DaesDemon)
- An assert failed when initializing variables with a function that took reference parameters. (Thanks mandrav)
- Chained expressions with overloaded operators and registered types could cause null pointer violations. (Thanks Anders Stenberg, a.k.a Dentoid)
- Expressions with multiple levels of indirections (.) and object handles as arguments in each level, caused incorrect bytecode. (Thanks Vexorian)
Version 2.4.1 - 2005/09/23
- Script language
- Added support for heredoc string constants. (Thanks Ashish Ranjan)
- Added support for array initialization lists.
Version 2.4.0 - 2005/09/15
- Bug fixes
- The bitwise negate operator, ~, now works with integer types as well, e.g. int and uint. (Thanks Suudy)
- Save and load of compiled bytecode with script arrays now work. (Thanks Evgeny Efremov, a.k.a wolfenstein)
- Library interface
- Added methods BeginConfigGroup(), EndConfigGroup(), and RemoveConfigGroup() for asIScriptEngine.
- The engine no longer allow overriding the array types if they are already being used elsewhere.
- All methods taking asUPtr as parameter was changed to take const asUPtr& instead, which ought to help avoid ESP problems that some people have encountered.
- Added an optional namespace. Define the flag AS_USE_NAMESPACE when compiling to put the script engine in the namespace AngelScript.
- Added a method SetCommonObjectMemoryFunctions() that allow the application to register an alloc()/free() function pair that will be used for all script objects.
- asIBinaryStream was changed to use asUINT instead of int for the block size, and const void * instead of void * for Write().
- Added a method SetCommonMessageStream(). The engine uses this output stream to output error messages when registering configurations, and also if the Build() method is called with a null pointer for the output stream. A second version of this method is available that takes a simple function pointer and an optional parameter, like a normal callback function.
- Build() and ExecuteString() no longer takes a pointer to an asIOutputStream. The old version is still available by defining the flag AS_DEPRECATED.
- Added method SetConfigGroupModuleAccess() which is used to set both default module access mode and individual module accesses.
- Script language
- Constant variables that are initialized with a constant expression, can now be used as named constants in for example switch cases. (Thanks juhnu)
- Library
- Changed the way the modules free global variables. Instead of a script function, it is now just a simple loop freeing each of the variables.
- asBSTR is no longer used internally to store constant strings, asCString is used instead.
- Converted the asCMap to template code.
- The assembler VM was removed as it will no longer be possible to keep it compatible with the C++ VM.
- Project
- Added as_configgroup.cpp and as_configgroup.h.
- Removed as_map.cpp
- Removed as_context_x86.cpp
- Removed as_bstr_util.cpp and as_bstr_util.h.
Version 2.3.0b - 2005/08/09
- Bug fixes
- Parameters where freed before the returned reference was used, which caused errors if the reference pointed to one of the parameters. (Thanks Suudy)
Version 2.3.0a - 2005/07/29
- Bug fixes
- Structure definitions and function declarations where not order independent. (Thanks Carl Ådahl)
- Added the old CreateContext() and GetGlobalVarPointer() as deprecated methods.
- Fixed some more compiler warnings.
Version 2.3.0 - 2005/07/14
- Bug fixes
- RegisterGlobalProperty() for object handles wasn't working correctly, the wrong address was used by the VM.
- The C interface for asIScriptGeneric wasn't declared correctly.
- Fixed a few compiler warnings. (Thanks Rain Dog)
- When calling methods on null handles, the application crashed with a memory access violation (Thanks Robert Manuszewski)
- If accessing the elements of a script array handle, the compiler wrongly made the elements handles as well (Thanks Scott Dillman, a.k.a AlphaDog)
- Library interface
- Added an interface to manipulate the any type, asIScriptAny.
- Added an interface to manipulate script structures, asIScriptStruct.
- Added an interface to manipulate script arrays, asIScriptArray.
- Added methods GetTypeIdByDecl() and GetTypeDeclaration().
- Added the method asIScriptEngine::CreateScriptObject() that allow the application to create objects from a type id.
- Added the method asIScriptEngine::GetObjectsInGarbageCollectorCount()
which can be used to finetune how often the GarbageCollect() is called.
- Changed the asIScriptEngine::CreateContext() to return the context pointer instead of placing it in the parameter.
- asIScriptEngine::GetGlobalVarPointer() now returns the pointer directly, instead of putting it in the argument.
- Removed the deprecated asIScriptContext::ExecuteStep().
- Script language
- New built-in type: any. This type will be able to hold any other type, as a generic container, though currently it can only hold object handles. It is possible to pass this type to the application.
- Library
- Changed the implementation for asCGCObject, since it is not possible to use multiple inheritance with anonymous pointers.
- Slimmed down the internal datatype representation, for the typeid feature.
- Virtual machine
- A new bytecode TYPEID has been implemented.
- The object types are now passed as pointers directly in the bytecode, instead of by index.
- Project
- Added as_anyobject.h and as_anyobject.cpp
Version 2.2.0 - 2005/06/08
- Script language
- New reserved keyword: struct
- The scripts can now declare and use structures.
- The compiler now automatically converts objects to object handles, when it is obvious a handle is wanted, i.e. there will be less need to use the @ operator.
- Library interface
- It is now possible to tell the library to automatically handle reference for handles passed to and from application functions. Simply add a + after the @. This makes it possible to pass handles to functions that do not call the release method before returning.
- A new method GarbageCollect() has been implemented that will free unused script objects. For long running programs it is necessary to call this every now and then. It can do either a full cycle or just a small incremental step, depending on the needs of the application.
- Virtual machine
- The bytecode now identifies object types locally to each module.
- There is a new bytecode OBJTYPE that translates a local object type id to the engine's object type id.
- Library
- Added a new preprocessor flag, AS_MAX_PORTABILITY, which removes all calls to assembler routines, which should make the library work on all platforms. In this mode, only asCALL_GENERIC can be used for application functions.
- Changed the internal data type description class to be easier to work with. The intention is to allow the application to access this to get information about types for global variables, function declarations, etc.
- Changed the implementation of the internal script array object to work more similar to the way script structures work.
- Project
- New files: as_scriptstruct.cpp and as_scriptstruct.h
- Added as_callfunc.cpp which implements the portable functions when AS_MAX_PORTABILITY is defined.
- Added the files as_gcobject.h and as_gcobject.cpp
Version 2.1.0c - 2005/05/26
- Bug fixes
- When getting the function declaration the library didn't set the 'in', 'out', 'inout' flags for parameter references (Thanks Andrey Kraynov, a.k.a _Dreamer)
- After loading precompiled bytecode script functions that took objects by handle couldn't be identified (Thanks Andrey Kraynov, a.k.a _Dreamer)
Version 2.1.0b - 2005/04/25
- Bug fixes
- The C interface wasn't exporting the functions. (Thanks Lars Peter Christiansen)
- Variables of types int and uint of any size weren't implicitly converted to bits.
- Uninitialized variables passed to &out parameters were incorrectly reported as uninitialized.
- The compiler was accepting assignments of any type to objects with no registered assignment operator.
Version 2.1.0a - 2005/04/11
- Bug fixes
- The null pointer access in the compiler when matching function arguments was removed (Thanks Lennart Denninger)
- The ?: operator was reusing temporary variables incorrectly.
- The compiler failed to compile the boolean not operator for variables. (Thanks SharkBait)
Version 2.1.0 - 2005/04/03
- Bug fixes
- The line numbers reported by the VM were incorrect.
- GetGlobalVarPointer() was returning a pointer to a pointer for registered object types. (Thanks Rain Dog)
- Fixed a possible crash when calling AddScriptSection() with 0 for section name.
- The operands for overloaded operators are now evaluated left-to-right.
- Output parameters weren't working correctly for object methods (Thanks Mårten Svanfeldt, a.k.a thebolt00)
- The engine failed when calling registered functions that received objects both by value and by reference (Thanks Lennart Denninger)
- Registered object types without registered constructor couldn't be used to create temporary objects in expressions.
- Global variables couldn't use overloaded assignment operators to initialize the variables.
- Object properties declared as object handles were not handled correctly by the compiler.
- Fixed a bug that crashed the application when compiling a function declared with a void parameter. (Thanks SharkBait)
- Sending complex objects by value to class methods caused a crash on GNUC based compilers. (Thanks Torsten, a.k.a torsten_pf)
- Passing objects by reference to constructors in declarations caused an assert failure. (Thanks Rain Dog)
- Script language
- The script language now allows statements like: func(expr), where the function doesn't take any arguments and
the expression evaluates to a void type. This is especially useful when using dynamically generating scripts where
the expression type isn't known before hand.
- Object variables and properties can be declared as const again
- Properties of a const object are automatically const as well
- When the object is const, the compiler doesn't allow non-const methods to be called
- It is possible to take a handle for a const object, but it can only be assigned to a handle to a const object
- The object held by a handle that is member of a const object, is not automatically const
- An object handle that is member of a const object is also const
- Const can be used for parameters again
- Virtual machine
- The calling convention used by the script engine now passes the object pointer as the first parameter instead of the last.
- GETOBJ was changed to read the offset from the stack instead of the address to the variable.
- Added GETOBJREF and GETREF to handle parameter references.
- Parameter references to overloaded operators are also protected by copying them to temporary variables.
- Added SWAP48 and SWAP84 to swap two values of different bytesizes.
- The compiler has been changed to output bytecode that don't keep unprotected pointers on the stack where they cannot be controlled. This will prove especially useful when I will later implement context serialization and co-routines.
- Calling the constructors with arguments are now also protected by not pushing the object pointer on the stack before the arguments.
- Library interface
- Implemented a C wrapper for the library. Compile the library with AS_C_INTERFACE to use it.
- Added a dummy array in asUPtr to make the size equal on all compilers (even when the C++ interface is disabled)
- Added SetLineCallback()/ClearLineCallback() to the context interface. These should be used instead of ExecuteStep() to control how much is executed each frame.
- Added SetExceptionCallback()/ClearExceptionCallback() to the context interface. These methods can be used for debugging purposes and allow the application to examine the callstack when an exception is raised.
- Added GetCallstackSize() and GetCallstackFunction() to the context interface.
- Added the possibility to turn off support for registering class methods. Compile the library with AS_NO_CLASS_METHODS. This can be used on compilers where class methods don't currently work.
- Added GetFunctionSection() to the engine interface.
- ExecuteStep() is now a deprecated method. Use the line callback method instead, which is much more flexible.
- Added GetCallstackLineNumber() to the context interface.
- All methods that return line numbers can now optionally return column number as well.
- Added the asCALL_GENERIC flag for functions using the generic calling convention.
- Added a new asIScriptGeneric interface for handling generic functions.
- Added GetObject() to the generic interface, that will return the object pointer when a method function using the generic calling convention is called.
- Added GetArgDWord(), GetArgQWord(), GetArgFloat(), GetArgDouble(), and GetArgObject() to the generic interface.
- Added SetReturnDWord(), SetReturnQWord(), SetReturnFloat(), SetReturnDouble(), and SetReturnObject() to the generic interface.
- Added two new behaviours asBEHAVE_ALLOC and asBEHAVE_FREE, that can be used to register custom memory allocation functions for an object type.
- Overloaded operators have been limited to only allow parameter references marked as 'in' (non-references are still allowed). This means that you cannot rely on that you receive a reference to the actual operand, as it might be a copy.
- The extra call to addref/release for the object pointer when calling class methods has been removed. The responsibility of making sure the pointer is valid during the call has been moved to the application.
- RegisterObjectType() now returns asALREADY_REGISTERED if name has already been registered as a type. (Suggestion by Adrian Licu)
- It is now possible to declare object methods as const, so that they can be called for constant objects. Ex: "void GetVal() const"
- Const overloading is now available for object behaviours and methods, i.e. if the object is const then the const version will be used, otherwise the non-const version will be used.
- AddScriptSection() now has an extra parameter that can be used to tell the library not to make a copy of the script code, and instead use the original pointer directly. (Thanks Adrian Licu)
- A new method ResetModule() was added to the engine. This can be used to reset the value of global variables for a module.
- Project
- Added as_generic.cpp and as_generic.h with the interface for generic functions.
- Removed the #include <memory.h> from the angelscript.h file.
- Added as_c.cpp with the C wrapper functions.
Version 2.0.0a - 2005/01/31
- Bug fixes
- GetCurrentFunction() and GetExceptionFunction() didn't return the function ID with the module index, affecting applications that were using module bindings (Thanks Tomas Stepanek)
- The library crashed when trying to register a function that used a handle to a type that had no addref/release behaviours registered (Thanks Adrian Licu)
- It wasn't possible to return null in a function which return type is a handle (Thanks Adrian Licu)
- Passing object handles by value to application functions could cause a crash (Thanks Adrian Licu)
- Fixed a minor memory leak when RegisterGlobalFunction() failed.
Version 2.0.0 - 2005/01/23
- Bug fixes
- GNUC: Classes with destructors can now be sent by value to system functions
- The compiler failed to successfully parse/compile temporary array constructors, e.g. int[](3).
- On GCC/Linux all classes/structs are returned in memory regardless of size, complexity, or calling convention. (Thanks Fredrik Ehnbom)
- Some compilers complained about the negative array size in the template code that is never instanciated. The code was commented.
- Overloaded assignment operators that take types other than the target can now be used in initializations. (Thanks Alan Kemp)
- asGetActiveContext() would cause an assert failure if called when no context was active. (Thanks Chee Chong Tay, a.k.a Iram)
- It was not possible to register arrays of registered types. (Thanks Tomas Stepanek)
- Library interface
- Removed deprecated functionality
- Removed the flag asOBJ_GUESS for RegisterObjectType().
- Removed the macros asFUNCTIONP() and asMETHODP().
- Removed GetReturnValue()
- Added GetReturnDWord(), GetReturnQWord(), GetReturnFloat(), GetReturnDouble(), and GetReturnObject()
- Removed SetArguments()
- Added SetArgDWord(), SetArgQWord(), SetArgFloat(), SetArgDouble(), SetArgObject()
- Protected destructors have been added to the interfaces so that the application doesn't call them by mistake (thanks Dan "Aggrav8d" Royer)
- Function declarations with arguments by ref must use the in, out, or inout flags
- Added the behaviours ADDREF and RELEASE that will be used by object handles to do memory management
- New context state: asEXECUTION_ERROR, that is set if one of the SetArg...() functions failed.
- Script language
- Removed the pointer type modifier
- Removed the -> operator
- In declarations the array brackets are now part of the type, i.e. for "int[] a, b;" both a and b are arrays
- Arrays can now be resized by using the method resize().
- Parameter references are now protected by copying the value into a
temporary variable when calling the function, and then copying the
temporary variable back to the original location when the function
returns. The expression is computed twice for in/out references.
- Function parameters by reference should use the flags in, out, or inout to allow the compiler to optimize the use of the parameters.
- Added the object handle type modifier so that object handles can be declared. The token @ is used so as not to confuse it with C++ pointers or references.
- Added the null keyword for object handles.
- const is now only available for variable and property declarations, and only for primitive types. This change was made for consistency and because the script language was not able to guarantee that an object isn't changed by object methods.
- Arrays have been limited to only allow four dimensions
- Virtual machine
- Removed the bytecode ADDOFF
- Objects are stored in dynamically allocated memory. A pointer to the memory is stored on the stack
- Created ALLOC/FREE instructions for allocating and freeing the objects
- Objects are returned in a register
- Created LOADOBJ/STOREOBJ that moves an object pointer from a variable into the object register, and vice versa
- Created GETOBJ which moves an object pointer from a reference to the stack, overwriting the reference
- Removed END and PEID.
- Simplified the exception handler to free objects based only on their position on the stack
- A script function receives an object by value and by ref the same way. The difference is if the function is the owner of the object or not.
- Added REFCPY to support reference assignments for object handles
- Added CHKREF to validate object handles when used as normal objects
- Added the bytecodes RD1 and RD2 to fix alignment problems on CPUs that requires data to be aligned.
- The VM keeps a reference to the object when calling a method, to protect the object from being released before the method returns.
- Library
- The library was made to work with Dreamcast once more. (Thanks Fredrik Ehnbom)
- The compile time flag BUILD_WITH_LINE_CUES was replaced with BUILD_WITHOUT_LINE_CUES. This flag is not
defined by default making ExecuteStep() work as specified, but for those that do not use this function the
performance may be increased a little by specifying this flag when compiling the library.