Releases: ferus-web/bali
0.6.3
Bali 0.6.3 is out. Yay. It has 49 commits made in the span of a week, and the codebase is now at 606 commits in total.
Call for Contributors
Hiya. I've been working on Bali alone for around 8 months. It's fun, but I must admit it's a bit tiring too.
I'm a student so I do not require any monetary support yet.
Hence, I'm asking anyone who wishes to contribute to the project to come forward and do so. You can join the Discord server to contact me directly, but if you're not a fan of that, you can use the Discussions tab in this repository.
You don't need to have any prior experience with this! I'll be more than glad to assist you with learning the internals of the Bali engine. You can start off with small contributions, and eventually you'll know the codebase just as well as I do. :^)
Fixes
- fix: codegen: getValueCaptures() now analyzes function calls
- fix: parser: don't blindly unpack option from parseAtom
- fix: parser: parse multiple arguments in function signature
- fix: vm: fix dynamically growing register reads
- fix: codegen: don't reset arguments before full load
- add: codegen: loadIRAtom now accepts undefined
- fix: codegen: LT/LTE mismatch
- fix: vm: correct CFIELD's broken semantics
- fix: GetMethod now respects bytecode/native segments
- fix: vm: RREG load undefined instead of empty object
- fix: codegen: fix some regressions
- fix: codegen: migrate Waste to new calling system
- fix: balde: don't parse line twice
- Removed Herobrine
Optimizations
- optimize: don't re-decode operations every execution
- fix: vm: don't perform unnecessary copying when decoding operation
- add: codegen: CopyValMut handles field resolution
Additions
- docs: bring docs up to date, part 1
- add: add support for Set type
- add: implement RequireInternalSlot
- add: add wasm tooling
- add: vm+codegen: binary greater or equal
- add: vm+codegen: binary lesser or equal
- docs: programming guidelines
Refactoring
Code Quality Improvements
- Bali is now using Nim compiler features like initialization proof and strict functions on the entire codebase.
- Bali's code is now checked against a static analyzer
Documentation
There are now programming style guidelines available for anyone who wishes to contribute to Bali.
The Major Improvements, in layman's terms.
Bali now no longer relies on hacky field resolution by a hardcoded object prototype when resolving fields in objects, so behaviour like:
var x = new String("Hello")
function thing(a) {
console.log("modified toString function called :D")
}
x.toString = thing;
console.log(x.toString())
console.log("end")
works now. In the above source, our custom thing()
function overwrites the base String.prototype.toString
function, which leads to all other functions that invoke that method to invoke our custom function.
0.6.2
0.6.2 is out with a single fix that fixes the final (known) regression that entered the codebase with 0.6.x! 🎊
Fixes
- Sequence types no longer hold pointers to atoms, holding full atoms instead.
- Removed Herobrine
Additions
- Added map parsing, although the code generation part is not complete yet.
Upcoming Features
For the next version, you can expect the Set
type to be implemented, alongside another (hopefully successful) attempt to implement bytecode callable atoms for functions-as-values to work.
0.6.1
0.6.1 is out with a single bug fix. It fixes a silly oversight that caused most programs that allocated memory to fail.
0.6.0
0.6.0 is a new series, overhauling the engine entirely.
Changes
- The VM is now in-tree.
- The garbage collector has been swapped by Boehm-Demers-Weiser Conservative GC, meaning
This is a breaking release, expect stuff to break. File bug reports for regressions.
0.5.0
"It is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring."
Bali 0.5.0 is out with multiple fixes, new features, adding up to 51 commits in total.
Most importantly, Bali now has support for true and loose equality now! This brings us one step closer to being more compliant.
Bug Fixes
- Grammar: Allow constructors as call arguments
- Grammar/Runtime: Allow identifiers to be wasted
- Fixed regressions in the URL functions since the move to
JSString
ToNumber()
now callsToPrimitive()
whenever necessary- Fixed double codegen for some functions
- Removed Herobrine
Additions
- Added
String()
function which is just another way to call the constructor - Balde: Added
--dump-statistics
- Implemented
String.prototype.codePointAt
String
(s) now have theirlength
property attached to them, which just contains how many UTF-16 code units the string has.- Implemented strict and loose equality. Issues with strict equality will be ironed out in the rest of the 0.5.x series.
Note
I will not be making any new releases until 15th of March, as I have to give my examinations. Until then, consider this project inactive.
0.4.4
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 toToPrimitive()
ToPrimitive()
now properly raisesTypeError
(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()
andisIntegralNumber()
- Bumped Mirage to 1.1.0, which brings the new
BigInteger
type
0.4.31
Bali 0.4.31 is out with a single compliance fix.
Bug Fixes
typeof
now returns"string"
instead of"object"
for strings created with theString
constructor syntax (i.e,new String
)
0.4.3
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 aTypeError
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
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 justlog
, which takes in theconsole
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
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, onlyDate.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 importingsimdutf
- We now return the index address to
undefined
when an identifier can not be found viaindex()
- The engine now uses the
Runtime
abstraction instead of directly requesting for a mutable reference to the Pulsar VM whenever possible