Releases: ferus-web/bali
0.3.7
This release brings many new things, the biggest one being support for unicode codepoint escapes in strings and identifiers! Also, the parser now no longer abuses unreachable branch markers, meaning that most, if not all syntax errors result in graceful SyntaxError messages.
We now pass 35% of all Test262 tests, but I believe that it is a bug with our test runner, because there's no way we made a 33% gain over a few commits.
Breaking Changes
There should be none. Just ensure that if any of your code uses unicode codepoint escapes, they are valid and can be correctly interpreted. If something like V8 (Node/Deno) or SpiderMonkey or JavaScriptCore (Bun) can interpret it just fine, Bali probably can too. If it can't, open a regression bug report.
New Features
- Unicode codepoint escapes now work in strings and identifiers
Fixes
- No more ungraceful parser crashes! (Hopefully)
0.3.6
This release finally stabilizes the setProperty
method for type definition fields.
Pardon me, I'm too lazy to write a proper changelog for this release. Nothing should break, hopefully.
0.3.52
This is yet another hotfix release.
0.3.51
This is a hotfix release.
0.3.5
This release brings many internal improvements, namely the support for Nim <-> JavaScript types (Nim objects can be converted to Mirage objects at runtime!).
We now stand at 2.5% of passing Test262 tests, a 0.5% increase from last release.
Fixes
- Local indexing would previously erase unequal identifiers if their owner function hash was the same, resulting in incorrect codegen and crashes
New Features
- Support for defining custom types
Breaking Changes
You should now define custom Nim types and pass it over to the runtime with registerType(name, typ)
instead of doing name mangling hackfests like <typ>.<functionName>
in defineFn
as a new overloadable variant of it exists which accepts registered types. The same goes for constructors. If a type is registered and defineConstructor
is not called on it, any attempts to construct an object with that type in JavaScript land will result in a TypeError
saying that the object is not a constructor.
Most of these changes are made in order to start implementing DOM manipulation functions in Ferus.
0.3.4
Bugfixes
- Fixed invalid codegen for constructors
- Tokenizer handles decrements (
--
) properly - Emitter now emits correct bytecode for decrements
- Return statements no longer use internal indexing for non-internal identifiers
New Features
- Balde now lets the runtime evaluate the AST and spit out syntax errors with
--dump-ast
. If you truly don't want the runtime to be instantiated, use--dump-no-eval
instead as it mimics the behaviour of the old--dump-ast
flag - Bali is now licensed under the GPLv3. This means that proprietary forks are now forbidden. The rest of the Ferus web engine's components will eventually follow suit.
- There is a new interop interface which greatly reduces abstracts the calls to Mirage and makes things leaps more maintainable and intelligible. Bali finally has a proper Nim <- JS interface.
Bali 0.3.3
This release of Bali cleans up a lot of the code, brings more compliance (2% of the entire Test262 suite now passes successfully) and brings while loops.
This release also fixes up a compilation error that was occuring with Nim 2.2.0, so Bali can be used with the Nim 2.2.x line now.
The Nim API remains the same, meaning you'll have to do next to nothing to update to this release.
Changelog
- Modularize the parser code
- Various parser improvements
- Add support for increment statements, like
i++
- Add support for while loops
Bali 0.3.1
This is the first published release of Bali, because I believe that it is stable enough to be used as a showcase.
Features
- Basic arithmetic operations on integers (add, subtract, multiply, divide)
- Basic boolean operations (equal, not equal) - the truthy equal operator is not implemented yet.
- Web Math API (mostly implemented and mostly compliant)
- Web Console API (mostly implemented)
- Some builtins like
parseInt
- URL parsing API
- Exceptions (No exception catching yet, though.)
- Proper type coercion system
- Web DOM specification helpers (namely,
atob
andbtoa
)
Compliance
As of dc89dae, Bali successfully runs 1.72% of the entire Test262 suite.
Dependencies
- Nim 2.0.0 or higher
- simdutf
Building
Run this command:
$ nimble balde
You can then use Balde to run JavaScript samples. There are plenty in tests/data
.
Running the Test262 benchmarks
$ nimble test262
$ ./test262.out run-all-tests-rec .
If you want to run a particular test category (say, language/comments
)
$ ./test262.out run-all-tests-rec language/comments
Reporting Bugs
Please use the correct tags when reporting issues, alongside providing the JavaScript sample if the issue is a bug.
Extra Notes
- The base64 encoder and decoder is SIMD accelerated, meaning that you need a CPU that has those instruction sets in order to use Bali. This shouldn't affect anyone with hardware made after 2010. ARM and RISC-V CPUs should work fine as well. (Not tested on those two)