DWScript 2.1 branched

DWScript 2.1 RC2 has been promoted to stable 2.1.0 status, if you already have 2.1 RC2, you don’t need to download anything new.

If you use SVN, there is a now a “stable-2.1” branch which will see only fixes, evolutions and additions will now resume under “trunk”.

What can be expected for DWS 2.2?

In addition to the previously listed goals, which are still part of the background work, there are a few specific goals for 2.2:

  • separating execution context from the expression tree. Currently a compiled script can be run multiple times, but from only one thread at a a time, if you need to run two, you need to compile two instances (thus using up twice the memory). The goal is to allow the same program to be run from multiple threads at the same time.
  • language support for contracts programming.
  • 85% testing code coverage psychological threshold.
  • more demos/samples, at least a couple showcases of IDE/Debugger support features.

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…)