Delphi Web Script 2.1 now at RC2

Thanks to all those who reported issues with RC1!
DWScript 2.1 RC2, available there (186 kB) or from DWScript SVN.

  • fixed D2009 compatibility
  • fixed passing of “const” open arrays
  • fixed support of exceptions raised during optimization
  • fixed memory leaks in one of the demos and in some cases of script errors
  • component “uglicons” are now visible again
  • added hints for function calls with no effect (detected after optimization)
  • added some more unit tests
  • improved error messages for various cases of incorrect code

Unless anything major is uncovered, this should be it for 2.1, and a branch will be made in SVN before 2.2 begins.

DWScript RC1 now available

Delphi Web Script 2.1 RC1 is now available from google code DWS page, you can also download it directly as a zip here (184kB).

Changes since the last SVN update are:

  • Added support for FreePascal-like compile-time $INCLUDE “macros”:
    • %FILE% and %LINE% insert the current filename and line number into the source
    • %FUNCTION% inserts the current function name, or class.method name into the source
    • %DATE% and %TIME% allow inserting the compile date/time
  • Various minor optimizations for integers and maths
  • Fixes for some corner-cases, ambiguous error reporting, a few new test cases

Everything’s got to end some day…

…and DWScript will likely enter RC phase before the year ends, as almost all of what I had in mind for 2.1 will be there!

Recent SVN additions since the last update:

  • 75% of the DWScript core code is now covered by unit tests (this was a psychological milestone for 2.1!).
  • class operators have been added, currently those are “+=”, “-=”, “*=” and “/=”, they follow a syntax similar to properties, in that a class operator isn’t defined as a special method, but as syntax sugar for a regular method (see below).
  • Function call overhead has been reduced for in-script functions & methods, as well as TdwsUnit-based functions & methods.
  • TProgramInfo now has ParamAsXxx[] properties, which allow accessing parameters by index and in a more efficient (is less-safe)  fashion.
  • Sqr() became a special function, it will now return an integer and not a float when operating on an integer.
  • Various fixes and error message clarifications (thanks Alexey Kasantsev).

(more…)