Skip to content

Tags: nooga/paserati

Tags

v0.9.12

Toggle v0.9.12's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Enhance optional chaining type narrowing in Checker

- Introduced a helper function to remove null and undefined types from union types, improving type narrowing capabilities.
- Updated handling for base expressions, including identifiers and member expressions, to apply the new narrowing logic.
- Enhanced debug output for back-propagated narrowing, providing clearer insights into type changes during optional chaining evaluations.

These changes collectively improve the accuracy of type narrowing in optional chaining scenarios, enhancing type safety and control flow handling in the Checker.

v0.9.11

Toggle v0.9.11's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Enhance type predicate handling and optional chaining support in Checker

- Updated the TypeGuard structure to include support for optional chaining base expressions, improving type narrowing capabilities.
- Introduced new methods for extracting type predicates from function call signatures, enhancing type resolution for type predicate functions.
- Improved handling of member expressions and optional chaining in type guard detection, allowing for more accurate type narrowing in conditional checks.

These changes collectively enhance the robustness of type checking and control flow handling in the Checker, improving type safety and accuracy.

v0.9.10

Toggle v0.9.10's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Implement decorator support in class and method definitions

- Introduced a new Decorator type in the AST to represent decorators applied to classes and methods, enhancing syntax support for modern JavaScript.
- Updated the parser to handle decorators in class declarations and method definitions, allowing for proper attachment of decorators during parsing.
- Enhanced the compiler to pre-evaluate decorators at class definition time and apply them to class members, improving compliance with ECMAScript specifications.
- Added new opcodes for managing initializer functions related to decorators, ensuring proper execution order and context.

These changes significantly enhance the language's support for decorators, aligning with ECMAScript proposals and improving usability in class-based structures.

v0.9.9

Toggle v0.9.9's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Add URI encoding/decoding functions and URIError handling

- Introduced global functions for URI encoding and decoding (`encodeURI`, `decodeURI`, `encodeURIComponent`, `decodeURIComponent`) to enhance compliance with ECMAScript specifications.
- Implemented `uriEncode` and `uriDecode` functions to handle string encoding and decoding, including proper handling of UTF-16 code units and reserved characters.
- Added a new `NewURIError` method for constructing URIError exceptions, improving error handling for built-in helpers.

These changes enhance the functionality and compliance of URI handling within the VM.

v0.9.8

Toggle v0.9.8's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Implement support for function calls within 'with' blocks

- Added the `emitCallFromWithContext` method to handle function calls resolved from a 'with' environment, ensuring the correct 'this' binding as per ECMAScript 12.3.4.1.
- Updated the `compileCallExpression` method to utilize the new emission for identifier calls within 'with' blocks.
- Enhanced the bytecode with a new opcode `OpCallFromWithContext` to support this functionality.
- Improved the VM execution logic to correctly handle calls from 'with' contexts, ensuring compliance with ECMAScript standards.

These changes enhance the handling of function calls in 'with' blocks, improving the VM's compliance with JavaScript specifications.

v0.9.7

Toggle v0.9.7's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Enhance compliance with ECMAScript specifications for function and cl…

…osure properties

- Updated the handling of function and closure objects to support symbol properties, ensuring that properties are correctly defined and retrieved according to ECMAScript standards.
- Refactored the property access and assignment logic to include checks for own properties on function and closure objects, improving the robustness of property management.
- Enhanced error handling for immutable bindings in strict mode, ensuring that assignments to immutable variables throw a TypeError as specified.

These changes improve the compliance and functionality of function and closure property handling within the VM, aligning with JavaScript standards.

v0.9.6

Toggle v0.9.6's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Enhance private member accessor handling in assignment expressions

- Updated the compiler to recognize and handle private member accessors (getters, setters, or both) during assignment expressions, improving encapsulation and access control.
- Modified the logic for emitting calls to private setters to include checks for getter accessors, ensuring compliance with ECMAScript standards for private member access.

These changes enhance the robustness of private member handling in the compiler, aligning with JavaScript specifications.

v0.9.5

Toggle v0.9.5's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Implement type checking skip functionality for pure JS mode

- Introduced a new `SetSkipTypeCheck` method in the `Paserati` and `Compiler` structs to allow complete bypassing of type checking for pure JavaScript mode.
- Updated relevant methods across the compiler and driver to respect the new setting, ensuring that type checking can be skipped during execution.
- Enhanced the handling of type errors and module loading to accommodate the new skip functionality, improving flexibility for JavaScript code execution without type annotations.

These changes align the compiler's behavior with JavaScript's dynamic nature, facilitating smoother execution of pure JS code.

v0.9.4

Toggle v0.9.4's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
Enhance error handling for undeclared variables in strict mode

- Updated the compiler to emit a ReferenceError when attempting to assign to undeclared variables in strict mode, aligning with ECMAScript specifications.
- Introduced a new method `emitStrictUnresolvableReferenceError` to handle the error emission.
- Added null/undefined checks before destructuring in for-of statements to ensure compliance with ECMAScript requirements.

These changes improve the compiler's adherence to JavaScript's variable scoping and error handling rules.

v0.9.3

Toggle v0.9.3's commit message

Verified

This commit was signed with the committer’s verified signature.
nooga mg
[chore] Adds hooks, linter config and code cleanups

Adds local pre- and post-commit hooks to run linters and auto-generate test baselines for Go changes.
Adds a linter configuration to enable/disable selected checks and tune timeouts.
Updates CI linter action to install via Go and pin a reproducible version.

Cleans up codebase to improve hygiene and silence warnings:
- Ignores benign returned values where appropriate and checks scanner/parse returns.
- Normalizes byte-emission API and updates call sites accordingly.
- Tightens variable initializations and minor logic corrections across parser, compiler and VM.
- Adjusts tests to handle ignored return values.
- Removes an obsolete backup file.

Improves developer workflow, CI reproducibility and reduces noisy linter/test failures.