Skip to content

May 4, 2021

Compare
Choose a tag to compare
@phoddie phoddie released this 04 May 22:45
· 4882 commits to public since this release

This release contains major updates to the XS JavaScript engine. After updating, please be sure to do a full, clean build of both the Moddable SDK tools and all your projects. Details are in the Update sections of the Getting Started guide for macOS, Windows, and Linux.

There is a new branch for on-going work to support ESP-IDF v4.3. The port is already stable and usable, with all major features confirmed to be working. This branch will updated as needed while ESP-IDF v4.3 is still pre-release. When it is final, we expect to switch over from ESP-ESP v4.2.

  • XS
    • JavaScript global variables defined during preload are now stored in ROM (Flash) until modified
      • Saves at least 1300 bytes per virtual machine, up to 2100 bytes for projects using Piu
      • Reduces memory required for a new Secure ECMAScript compartment to 624 bytes
    • Changes to XS IDs
      • Default 16-bit ID values now use all 16-bits (previously limited to 15-bits) allowing for up to 65535 unique property names
      • Option to use 32-bit ID values (#define mx32bitID 1) for non-embedded builds
      • xsGet now only works for property ID values, not indices. To get by index use xsGetIndex. Similar changes to xsSet and xsHas.
    • Fixes
      • Fix memory allocator bug that unintentionally caused buffers to be allocated at minimal size, leading to thrashing. Introduced recently with changes to detect overflow in buffer size calculations. #637 (reported by @warner at Agoric)
      • Symbol.for('bar').toString() did not include the symbol name. #621 (reported by @dckc at Agoric)
      • Fix injection attack in Function constructor #623 (reported by @dckc at Agoric)
      • Fix garbage collector interaction when invoking hasProperty in the run loop #627 (reported by @dckc at Agoric)
  • ECMAScript® Embedded Systems API Specification
    • Updates to io.md to synchronize with final draft of ECMAScript® Embedded Systems API Specification (Ecma TC53) (requested by @stc1988)
    • Fix build conflicts with IO modules and Pins modules
  • Graphics: Commodetto and Piu
    • New Piu GIF Image object to directly embed animated GIF in Piu screen
    • Animated GIF decoding directly to black and white (1-bit), gray scale (4-bit), and 256 index color to reduce memory required for back-buffer when possible
    • Add indexed 256 color bitmap format to Commodetto to support animated GIF
    • In Piu Port, fix obscure potential problems with garbage collection timing
    • Change function name from convert to process in Commodetto pixel format conversion document. #637 (reported by @stc1988)
  • PWM on ESP32
    • Supports manifest defines for the off value and frequency
    • Checks error on pwm.write and explicitly sets additional configuration struct members
  • Crypto and TLS
    • Optimize Montgomery and Jacobian functions.
    • Reduce memory allocations in cryptographic functions
    • Optimize fxBigInt_uadd_prim using GCC built-ins
    • TLS client implementation now always replies to CERTIFICATE request, even if the response is empty. Fixes compatibility with servers build with Java 10.
  • Optimizations to BLE implementation focused on reducing how often garbage collector runs