Skip to content

Releases: ferus-web/bali

0.4.4

14 Jan 06:34
Compare
Choose a tag to compare

This is a new Bali release with 27 new commits, bringing many new additions and bug fixes.

Bug Fixes

  • Tokenizer tokenizes floating point numbers incorrectly (#68)
  • Field accesses in Math don't work due to a codegen bug (#67)
  • Don't use explicit casts in getDateFromYear as that causes bugs
  • ToString() no longer gives an incorrect hint in some cases now to ToPrimitive()
  • ToPrimitive() now properly raises TypeError(s) on failure
  • Removed Herobrine

Additions

  • Implemented String.fromCharCode
  • Implemented Date.prototype.toString
  • Implemented Date.prototype.getYear
  • Implemented Date.prototype.getFullYear
  • Implemented Date.prototype.getDay
  • Implemented Date.prototype.getDate
  • Improved Test262 harnesses
  • Implemented ternary operations
  • Added rudimentary support for the BigInt type using GMP
  • Implemented isFiniteNumber(), isBigInt() and isIntegralNumber()
  • Bumped Mirage to 1.1.0, which brings the new BigInteger type

0.4.31

07 Jan 07:39
Compare
Choose a tag to compare

Bali 0.4.31 is out with a single compliance fix.

Bug Fixes

  • typeof now returns "string" instead of "object" for strings created with the String constructor syntax (i.e, new String)

0.4.3

06 Jan 13:43
Compare
Choose a tag to compare

Bali 0.4.3 is out with 25 commits in total and multiple new features, optimizations and fixes.
There are 6 new additions and 2 bug fixes. There should not be any breaking changes migrating to this release.

New Additions

  • Implemented two new bytecode optimizations:
  • Loop allocation elimination (to reduce expensive loops' memory footprint)
  • Return-value register cleaner (to reduce memory usage when calling functions and discarding their return value)
  • Implemented String.prototype.concat
  • Implemented String.prototype.repeat
  • Comments in array index and array construction are now correctly ignored instead of raising a SyntaxError
  • Stabilized JavaScript Date API!
  • Implemented Date.parse
  • The Date constructor can now take in ISO 8601 compliant date strings as arguments
  • The rest of the prototype will be implemented in upcoming versions
  • Implemented RangeError

Bug Fixes

  • Field-access on the null type is no longer allowed, it throws a TypeError as the spec mandates.
  • Identifiers can now be used to index arrays
  • Removed Herobrine

Full Changelog: 0.4.2...0.4.3

0.4.2

17 Dec 17:14
Compare
Choose a tag to compare

This is a new release with several breaking changes, with 38 commits in total.

Engine Additions

  • The engine now has support for multiple instances of a type that are created via the constructor syntax.
  • Alongside this, a new way to define a function for a type's prototype has been added via definePrototypeFn.
  • Implemented some of the String prototype functions
  • String.prototype.toLowerCase
  • String.prototype.toUpperCase
  • String.prototype.indexOf
  • String.prototype.trimLeft
  • String.prototype.trimRight
  • console is a standalone type now, instead of a name-mangling hack. This means that all engine components now use the new type interface.
  • Calls are parsed as field accesses whenever necessary. This means that the bytecode interface consoledotlog is now just log, which takes in the console type as an argument alongside the rest of the arguments.

Bug Fixes

  • String trim implementation was wrongly written, resulting in right-facing whitespace not being trimmed (#58)
  • Scope hashing would result in an infinite recursion if two scopes were linked
  • The runner would incorrectly output unrelated errors to stderr, which'd result in expected errors being treated as unexpected, giving us a lower score on test262.fyi

REPL Changes

  • Added the .express command. You must provide an integer argument to it and it will pretty-print the atom at the address, if it exists.

Dependencies

  • Bumped Mirage from 1.0.42 to 1.0.43
  • Added Kaleidoscope: a library providing SIMD accelerated routines for strings (as you might have guessed, it is related to the above additions :^) )

Breaking Changes

  • The command for running a file with Balde is just balde <file> now.
  • Old, cached compressed-bytecode is incompatible with this new release. There's unfortunately no invalidation mechanism for different bytecode versions right now, so you're advised to remove the ~/.cache/mirage directory entirely in order to prevent weird bugs.

0.4.13

11 Dec 11:19
Compare
Choose a tag to compare

This is a minor release and lays down some scaffolding for the next few versions.

Additions

  • Implemented encodeURI
  • Implemented string padding implementations used internally
  • We now have CI builds per push, which automatically runs the test262 runner, our internal tests and generates a build artifact
  • Added Date as an experimental feature. To enable it in Balde, use --enable-experiment:date-routines. Currently, only Date.now() is supported.
  • Added field-write helper for Nim primitives, which makes wrapping objects between the Nim <-> JS layer much more convenient.

Fixes

  • Fixed reassignment parsing algorithm (#54, #55)
  • -d:baliUseStdBase64 no longer tries importing simdutf
  • We now return the index address to undefined when an identifier can not be found via index()
  • The engine now uses the Runtime abstraction instead of directly requesting for a mutable reference to the Pulsar VM whenever possible

0.4.13-alpha2

10 Dec 09:49
Compare
Choose a tag to compare
0.4.13-alpha2 Pre-release
Pre-release

Please do not use this release, it is not meant for production as it isn't as thoroughly tested!

Fixes

  • Undefined identifiers now return undefined correctly

Additions

  • encodeURI implementation

0.4.13-alpha1

08 Dec 07:09
Compare
Choose a tag to compare
0.4.13-alpha1 Pre-release
Pre-release

This is an unstable release and is not suitable for production!
It brings major changes, some of which are breaking.
Bali is now at 4.6K LoC!

Additions

  • Added field-write helper for Nim primitives.
  • Began work on JavaScript Date API.
    • This is currently hidden by an experiment. To use it, pass --enable-experiment:date-routines to Balde.

Fixes

  • Fixed numerical tokenization algorithm. This breaks the REPL in some cases, it'll be fixed soon.
  • Fixed declaration parsing algorithm for more syntax flexibility.
  • Balde no longer enables REPL mode in script-runner mode.

Full Changelog: 0.4.1...0.4.13-alpha1

0.4.1

30 Nov 14:38
Compare
Choose a tag to compare

This release builds on top of Bali 0.4.0 and brings a REPL environment to test JavaScript in.

Changes

  • Bali no longer has a dependency on climate, it uses its own argument parser based off of std/parseopt, derived from the Lucem project.
  • Added the --dump-bytecode flag to dump the generated bytecode and exit.
  • Added a REPL to evaluate JavaScript inside of. It is powered by the noise library.

Breaking Changes

There are no breaking changes this release.

0.4.0

28 Nov 06:36
Compare
Choose a tag to compare

This is a new Bali release, and as usual, brings new features and improvements.

Bug Fixes

  • Fixed a bug where JavaScript code could call internal Bali APIs, which'd make fingerprinting the runtime very trivial.
  • Initializing a mutable array would result in the address index pointing to its last element instead of the container itself (#45)
  • Fixed decrement parsing, yet again
  • Improved loop elision algorithm (#46)
  • Value capture would result in invalid codegen (#44)
  • ToNumber now handles floats correctly instead of reaching the unreachable branch

Dependencies

  • Bali now uses Sanchar 2.0.2, which brings improvements to the URL parser

New Features

  • Added array indexing. You can now access elements of an array. If you do an out-of-bounds read, undefined will be returned.

Breaking Changes

There should be no breaking changes in this release. You can safely upgrade to it.

0.3.83

25 Nov 03:52
Compare
Choose a tag to compare

This release brings some improvements and loop elision optimizations.

Fixes

  • Fixes #43 (Loop generates unnecessary code)
  • Removed some dead code
  • Stray atoms are marked as "wasted" instead of raising syntax errors

Full Changelog: 0.3.82...0.3.83