This summary of recent DWS changes is coming a bit late, and there is quite a bit to cover. Here is a quick, partial roundup of what changed since the last update.
Language changes:
- Initial support for overloads (currently limited to standalone functions/procedures).
- New operator “sar” for bitwise shift arithmetic right.
- Delphi-like “dotted unit names” are now supported.
- Support for classic Delphi-style local procedures declaration in units (before the “begin”).
- Support const “blocks” in units.
- Support for “array [TEnumeratedType] of” short declaration for static arrays.
- New hints for unused private symbols and redundant scope specifiers.
- New built-in functions: LastDelimiter, dynamic array’s Insert(), Min()/Max() overloads.
Library and script engine changes:
- TContextMap & TSymbolDictionary were renamed to TdwsSourceContextMap & TdwsSymbolDictionary.
- The context map content has been significantly reorganized, fixed and is now more detailed.
- TdwsSuggestions can now optionally suggest keywords too.
- Random functions now based on XorShift, with independent random per execution.
- New demo/sample: simple web server based on Indy with multi-threaded server-side script execution.
- Faster DWS SynEdit highlighter.
- Improved documentation.
- Various minor fixes and improvements.
JavaScript & CodeGen changes:
- Closures are now supported by the JavaScript CodeGen.
- Added Smart-Linking capabilities to the CodeGen when program is compiled with context map & symbol dictionary. Its capabilities and limitations are currently roughly similar to Delphi’s.
- Improved JavaScript CodeGen for various code generation cases (faster and smaller, as measured through jsperf benchmarking on various browser engines).
- Improved JavaScript obfuscator.
- Improved JavaScript minifier.
I was in need for sar (and true shr) in JavaScript CodeGen for coding CRC32 and SHA256 in DWS. Thanks for your fast and efficient support!
Some new features are very welcome to me: for instance, I use very often “array [TEnumeratedType] of” static arrays in my code.
So much improvements! Thanks!