summaryrefslogtreecommitdiff
path: root/src/stages/bytecode.rs
Commit message (Collapse)AuthorAge
* Implement <len> operator for expressionsBen Bridle16 hours
| | | | | The <len> operator returns the width of an integer in bits, using the same calculation as for packing an integer into a bit field.
* Fix width checks for negative integersBen Bridle7 days
| | | | | | | | | | | | The width of a negative integer was previously being counted in the same way as for a positive integer, by inverting the bits to make it a positive integer and then finding the placement of the highest-order 1 bit. The actual width of a negative integer will always be one greater than this value however, because the highest-order 1 bit of an inverted negative integer will always have directly above it a significant 0 bit used as the sign bit.
* Rewrite entire assemblerBen Bridle2025-03-11
The language is now more general, the code is better structured, error reporting is more detailed, and many new language features have been implemented: - conditional blocks - first-class strings - more expression operators - binary literals - negative values - invocations in constant expressions