js_interpreter 0.0.2
js_interpreter: ^0.0.2 copied to clipboard
A comprehensive, pure Dart JavaScript interpreter supporting ES6+ features. Perfect for embedding JavaScript execution in Dart/Flutter applications.
0.0.2 #
Features #
- ES2024 Support: Implemented Explicit Resource Management (
usingandawait usingdeclarations). - ES2015 Support: Added Tail Call Optimization (TCO).
- Core Improvements:
- Implemented proper
withstatement environment handling andSymbol.unscopablessupport. - Enhanced
Promisemicrotask queue and async function execution logic. - Added support for dynamic imports.
- Improved
Functionconstructor to supportreturnstatements in dynamically created functions.
- Implemented proper
Compliance & Bug Fixes #
- Parser & Syntax:
- Added comprehensive "Early Errors" validation for functions, classes, and loops.
- Fixed Automatic Semicolon Insertion (ASI) to correctly handle all Unicode line terminators (LF, CR, LS, PS).
- Improved validation for
breakandcontinuelabels. - Fixed strict mode inheritance in
eval()and strict mode-specific validations.
- Data Models:
- Improved
JSValueto DartMap/Listconversion with support for enumerable properties and recursive conversion. - Refined error object detection logic.
- Improved
- Execution:
- Fixed completion values for control structures (blocks, loops, switch).
- Improved lexical scoping for
letandconstinforloops andswitchstatements. - Fixed
thisbinding in async functions and arrow functions.
Testing #
- Significantly improved
test262test runner compatibility. - Fixed numerous bugs discovered through
test262compliance testing.
0.0.1 #
- Initial version.