- DelphiTools - https://www.delphitools.info -

DWScript – October 2012 – 2.3 preview 2

A new DWScript 2.3 preview 2 7zip [1] (422 kB) is available for download for those that don’t use the DWScript SVN [2]. This version should be the last before a release candidate for 2.3. As the lead version is Delphi XE, users of Delphi 2009, 2010, XE2 and XE3 are especially encouraged to report any issues they encounter. FreePascal support is still considered experimental at this moment.

Language improvements

Compiler and support libraries

  • language extension have a new StaticSymbols virtual method, which allows static symbols to be used even when language extensions are in use
  • dwsJSON Delphi 2009 compatibility fixes (thx Hallvard Vassbotn)
  • dwsJSON new AddValue() overloads, new jvtUndefined, minor speedups and other minor fixes
  • XE3 compatibility workaround (thx Steffen Binas)

Quick note about static symbols:

TdwsUnit has a StaticSymbols property, which when set to true will allow that unit’s symbols to be considered static by the compiler, ie. reused across multiple compilations.

When static symbols are not used (the default), each compiled scripts is self-sufficient, it holds its own copies of the symbol tables, and is sand-boxed from scripts compiled before or after it. When static symbols are used, the units with static symbols are shared across compiled scripts, which will speedup compilation and reduce memory usage.

When you enable static symbols, the TdwsUnit (and all it dependencies), is no longer allowed to change. You should also avoid manipulating the symbols and symbol tables (through reflections or symbol libs), unless you want those manipulations to affect all compiled scripts.