Nombas > ScriptEase ISDK DevSpace > Manuals > What's new in 5.01

 

What's new in 5.01
For 5.00 users moving to 5.01 - what to look for

This document is intended for SE:ISDK/C or SE:ISDK/Java movers moving from version 5.00 to 5.01.

5.01 30-day evaluation availble now for C/C++, Java, or J2ME download

API Enhancements

  • The SE_SCOPE stock object has been added. SE_SCOPE is similar to using SE_GLOBAL or SE_THIS except that SE_SCOPE will follow the existing scope chain to locate the specified value. SE_SCOPE will follow the appropriate _prototype or __parent__ inheritance on get and put.
  • SE_COMPOUND_MEM and SE_COMPOUND_UNIMEM have been added as member specifiers to get or put complex member names. A single call to seGetLong(..SE_COMPOUND_MEM("a.b.c.d")...) can be a lot less coding than the multiple calls to seGetObject() or seParseVar() that were required in 5.00.
  • SE_HIDDEN_MEM and SE_HIDDEN_UNIMEM have been added as member specifiers to associate data as a member of an object that scripts can neither see nor change. This method is much more robust than the old SE_OBJECT_DATA method or attaching data to oddly-named members, because 1) hidden members allow any number of associations, 2) they assure that your data has not been corrupted by the script, 3) hidden members follow the same inheritance rules as standard members, and 4) the internal implementation of hidden members is much faster and smaller than the SE_OBJECT_DATA or sePtrxxx() calls of previous releases.
  • seInternalizeStringHidden() also creates sestring types that are hidden from scripts
  • seGetInternalString() returns strings that are now safe from being overwritten by other calls to the API, so you don't need to quickly store them elsewhere. These returned strings follow the same lifetime rules as anything returned from seGetString, and are freed the same way. Nearly all conceivable uses of seGetInternalString() are in callbacks, which automatically release the strings when they return, so it is difficult to come up with a case where you would need to explicitly free a string returned by seGetInternalString().

New ways to save memory

  • On processors where data must be aligned on non-byte boundaries, object members typically use half as much memory as in previous versions(down from 32 bytes per member to 16 bytes per member). For systems with many objects, these members actually use the most memory, therefore creating a noticeable memory savings..
  • A phase of the garbage collector has been added to minimize extra memory used by objects if those objects are not frequently changing.
  • seGarbageCollect(SE_COLLECT_AND_MINIMIZE) option has been added to release all non-critical memory from objects and pools. This is not a call to be made frequently, but is useful if your putting a context in a suspended state or if some other part of your systems is aching for more memory.
  • The garbage collector has been rewritten to require no extra memory during the mark/sweep pass.

New build options

  • JSE_DISABLE_GOTO - This new option in jseopt.h can remove the "goto" keyword, which is not a standard part of ECMAScript.
  • SE_TOO_MANY_OBJECTS_WARNING, SE_TOO_MANY_STRINGS_WARNING are added to jseopt.h to warn about situations where your use of the API is creating many temporary objects. This usually indicates that that section of code should be written more efficiently and is making the scripting engine run slower than it could.
  • JSE_ZIP_ALL has been added to jseopt.h build the zip object library
  • JSE_STACKCHK has been added to jseopt.h to allow you to set a field (stack_limit in struct seContextParams) so that the script engine will recover with a manageable error object if too much system stack is used. The engine interpreter itself is not recursive and uses very little stack for most processing, but compiling expressions and regular-expression statements within many parenthesis can be recursive
  • project files have been created for the Borland compiler
  • Unix makefiles have been simplified to be easily copied into new projects of your own
  • Our internal memory routines are now more easily disabled and replaced with any other memory-management library
  • SE_GETSTRING_SHORT_POOL has been added to jseopt.h to specify the size of a pool for temporaryy-locks on short and average-length strings returned from the API. Even a small pool can prevent many calls to memory allocation and improve API performance.

Miscellaneous

  • Our global variable cache, which improves performance while scripts scope global variables, now recovers quickly after it has become invalidated by "with" statements
  • seThrow() and other uses of our error reporting system now grow memory as needed to print longer and more in-depth error messages
  • More useful names are added to error messages. For example, instead of "variable is not a function type" you're likely to get "variable 'reconsile' is not a function type"
  • add SE_VARINIT_NO_RETURN to duplicate a common browser quirk such that an eval() single statement when declared with the "var" keyword will return undefined (e.g. eval("var x = 100"))
  • Fully floating-point library is enabled for the Blackberry version
  • Support of __parent__ inheritance is now consistent through all global API calls (such as seEval) and through other API calls with the SE_SCOPE object
  • CString library has been updated to run many times faster and use much less memory - also the Clib objects understand CString better.
  • API functions no longer alter the SE_RETURN object except when explicitly directed to do so (e.g. sePutxxx(..SE_RETURN..), or if using seEval() or seExec(), or if altered indirectly via an error generated in SE_RETURN,SE_VALUE.
  • COMReleaseObject added to the COM object to specifically free objects before GC has deleted them

ScriptEase Workshop / Debugger version 2

  • ScriptEasy intelligent coding support adds context-sensitive language information as you write scripts with dot completion, code templates, parameter hints, enumerated property values, and integration with the manual.
  • Workshop is completely extensible for new features, objects, and languages through underlying XML description files
  • Customizable, dockable IDE with advanced editing and coding functionality for integration with your own products
  • Debugger is now complete and faster for both local and remote script debugging

Coding Changes

These are deprecated functions or change for 5.00 users to watch out for with the 5.01 API. Most of the old behaviors can be re-enabled (although this is not recommended) by compiling with SE_OLDVER_500E defined.

  • seParseVar() has been renamed as seVarParse() and an extra parameter has been added to specify a staring object - however, the new SE_COMPOUND member specifiers (mentioned above) remove need for this function in most cases
  • SE_GETINTERNALSTRING_NO_LIFETIME option has been added to turn off the new lifetime rules of seGetInternalString() (as mentioned above)
  • JSE_API_ASSERTLEVEL and JSE_API_ASSERTNAMES, options, along with eh jseApiOK macro have been removed. The engine was no longer using these methods for reporting errors.
  • SE_OBJECT_DATA and the sePtr() methods (sePtrAdd, sePtrRemove, etc...) are no longer the preferred "magic" way to store a C/C++/Java object with a script object. Instead, use the more robust new hidden members (as described above)
  • C++ SEObjectWrapper users need to add a new parameter when using the SEOBJWRAPPER_DECLARE_METHOD and SEOBJWRAPPER_DECLARE_VOID_METHOD

Home | Scripting | Products | Purchase | Download | Support | Company

Copyright ©2001, Nombas, Inc. All Rights Reserved.
Questions? Visit
http://support.nombas.com/