Here are the recent changes for DWScript from the SVN side.
As things settle down, next version should hit RC status by the end of the month.
- Added two new forms of “for in” which are fully Unicode-capable, ie. they work for characters outside the BMP, and unlike Delphi (or Java, or C#, or JS…) are fully Chinese (and Cuneiform) capable:
- for <integer_variable> in <string_expression> do … : enumerates Unicode code values (in the full 0 to $10FFFF range)
- for <string_variable> in <string_expression> do … : enumerates Unicode characters
- Introduced initial support for attributes (TCustomAttribute), currently they are accepted only at the class level.
- Delphi compatibility: support parenthesis ( ) as an alternative to brackets [ ]when declaring constant arrays, so all the following forms are now equivalent:
const a : array [0..1] of Integer = (1, 2); const a : array [0..1] of Integer = [1, 2]; const a = [1, 2];
- Properly qualify error when array methods are invoked on an array type rather than an instance.
- Fix for some cases of sub-functions nested in a method calling another method of the parent class.
- Fixed an optimization issue when passing object fields as a var parameter.
- Fixed evaluation of “for in” dynamic operands (such as function calls) so they’re evaluated only once.
- Fixed assertion message surfacing in some runtime situations.
Changes applying to SmartMS (future version)
- Now supports class methods on external classes.
- Optimized several cases of record copy/assignments.
- Added peephole optimization for “Ord(str[i])” to “str.charCodeAt(i)”.
- Fix CodeGen for static class methods of helpers.
- Fixed cloning function for records that have sub-structures.