DWScript now support Delphi 11.3 Alexandria

Latest commits in the DWScript repository bring compatibility with Delphi 11.3 Alexandria.

There were very few changes required, and a couple bugs were fixed in the process. One test (stack overflow) had to be tweaked, apparently the new compiler uses more stack space, which caused one of the unit tests to fail in the “wrong “place.

All in all the 11.3 IDE and compiler appear way more stable, and AVX2/FMA support is nice… hopefully will get support in the CPU debugger as well soon 🙂

Initial Beta Release of FocusFusion

Just released the initial beta of FocusFusion to the Windows Store!

This is my first attempt at building an appx with Delphi and releasing it to the store 🙂

You can download it from the Microsoft Store.

FocusFusion is a utility for focus stacking photography. It can take a set of images captured with shallow depth-of-field and merge them together to create a single “all-in-focus” image. This allows otherwise impossible images to be made.
(more…)

DWScript 22.6.28 release

Periodic DWScript release 22.6.28 has been created on the DWScript GitHub.

This release includes a variety of micro-optimizations (many memory-related) for the compiler, runtime and JavaScript codegen, as well as fixes and improvements.

The language syntax has been slightly extended for the Pascal-to-Javascript transpiler to cover the case of read-only external properties. (more…)

DWScript compatible with Delphi 11.1

Just downloaded and installed Delphi 11.1, and all the unit tests passed without a glitch. So I can announce that DWScript is compatible with Delphi 11.1 for Win32 and Win64! You can find links to all the Delphi 11.1 release details on Marco’s blog.

In other news, the tip of the DWScript repository is considered stable, but a round of core changes were made a few days ago. The last stable state just before the round of changes can be found in the DWScript Releases on the GitHub mirror. The next round of changes likely be able to will rip out the stack from the engine, and transition to closures.

DWScript now compatible with Delphi 11

Just pushed a few changes to the DWScript repository for compatibility with the just released Delphi 11 Alexandria.

The only change required was related to a fix of the Delphi compiler, which now properly has integer overflow checks controlled by $OVERFLOWCHECKS while they were previously controlled by $RANGECHECKS.

I also added support for the Delphi 11 dialect for binary literals (starting with %). DWScript already supported binary literals with the “0b” prefix since 2012 (as in C), I had been hoping the % symbol would not be sacrificed for this purpose, but oh well. (more…)

Nested types in DWScript

Just a word of warning about a recent commit that added support for nested types in DWScript.

This support is at the moment only enabled in class declarations, and very minimally tested, a lot more testing is required – and welcome 🙂 – before it can be considered safe to use, and extended to other type declarations.

The related code should only kickoff if a “type” keyword is encountered in a class declaration (which would previously be reported as an error), so the change should be innocuous to existing code.

SQLite as a no-SQL database

SQLite offers through its JSON1 extension a lot of capability. Generating JSON outputs from SQL, even complex structured, multi-level JSON is very straightforward.

But what about the opposite use case ? When you have store data as JSON in an SQLite database, and you want to search or filter it ? This is a short exploration of what to expect.

(more…)

First phase of dynamic arrays refactoring completed

The first phase of dynamic arrays refactoring mentioned previously is now complete, with dedicated implementations in place for all the base types. A single interface (IScriptDynArray) is now the only common ground.

  • Memory usage is reduced to 1/3 on average, performance is improved up to 2x (without JIT)
  • Array indexes have thus been bumped from Integer to NativeInt, as arrays of more than 2 billions elements have become more practical

The current state has been frozen in Release snapshot DWScript v21.3.11 on the GitHub mirror.

(more…)

Refactoring DWScript dynamic arrays

After reaching initial stages of the x86-64 JIT, work on a long overdue enhancement of the DWScript engine has started: refactoring how dynamic arrays are implemented.

One of the goals when the 32bit JIT was introduced was to edge out the Delphi 32bits compiler, which was not too complicated as Delphi was using the FPU, so merely using SSE2 at the time was enough. But the Delphi 64bits compiler makes good use of SSE2, so the only way to edge it out would be to leverage AVX2 and vectorisation.

(more…)