Haled Odat
1d66836a32
Refactor ordinary VM calling ( #3295 )
...
* Refactor ordinary VM calling
- Prevent recursing in `__call__` and `__construct__` internal methods
* Apply review
* Refactor `Context::run()`
* Fix typo
* Apply review
1 year ago
José Julián Espina
3177540979
Implement synthetic modules ( #3294 )
...
* Implement synthetic modules
* Add example
* Fix example
1 year ago
arexon
afb9283ce8
Implement `[[HostDefined]]` for `Module` and `Script` ( #3381 )
...
* Implement `[[HostDefined]]` for `Module` and `Script`
* Format
1 year ago
raskad
f654ad1784
Refactor compile time environment handling ( #3365 )
...
* Refactor compile time environment handling
* Apply review
* Apply review
1 year ago
Haled Odat
332fd658a8
Varying length instruction operands ( #3253 )
...
* Implement varying length operands
* Apply review
* Apply review
1 year ago
José Julián Espina
ae414797af
Format code snippets in docs ( #3317 )
1 year ago
Haled Odat
822634cf41
Implement `[[HostDefined]]` field on `Realm`s ( #2952 )
...
- Improve HostDefined field to allow multiple stored types
1 year ago
Haled Odat
6a91a85e0e
Store active runnable and active function in `CallFrame` ( #3197 )
...
* Move acrive runnable to CallFrame
* Move active function to CallFrame
* Add some code doc
* Fix doc link
* Apply review
1 year ago
Haled Odat
c2df31b781
Improve bytecompiler bytecode generation. ( #3188 )
...
* Improve bytecompiler bytecode generation
* Implement push f32 value (#3198 )
1 year ago
Haled Odat
d8bf5f589d
Refactor `Context::run()` method ( #3179 )
...
* Refactor `Context::run()` method
- Remove async generator close from run
- Remove promise capability from run
- Remove promise capability check from call_internal
- Remove generator creation from call_internal
- Move promise capability creation to separate opcode
* Inline ReThrow opcode in run
1 year ago
Haled Odat
be055a30e1
Refactor environment, exception handling and jumping in VM ( #3059 )
...
* Refactor environment, exception handling, generators and jumping in VM
* Add helper for JumpIfNotResumeKind opcode
* Better handler display for CodeBlock
* Update documentaion
* Factor exception handling from throw opcodes
* Simplify try compilation
* Only push try statement jump controll info if needed
* Add helper functions checks in async and generator
* Run prettier
* Remove redundant check for end of bytecode.
We always emit a `Return` opcode at the end of a function, so this should never be reached.
* Fix doc link
* Implement stack_count calculation of handlers
* Fix typo
* Rename `LoopContinue` to `IncrementLoopIteration`
* Fix typo
* Remove #[allow(unused)] from Handler field
1 year ago
Choongwoo Han
72b7ee5866
Re-enable must_use clippy rule ( #3180 )
1 year ago
João Borges
93d05bda68
Fix 1.71.0 lints ( #3140 )
...
* Fix 1.71.0 lints
* Attest suggestion
1 year ago
Haled Odat
40f33d8efb
Move `RefCell` of `CompileTimeEnvironment`s to field `bindings` ( #3108 )
...
* Move `RefCell` of `CompileTimeEnvironment`s to field `bindings`
All field except the `bindings` field are mutated after `CompileTimeEnvironment`
creation. It moves the `RefCell` to `bindings` field, this cleans the methods callsites.
* cargo-clippy
1 year ago
José Julián Espina
395d0c8d42
Format let-else expressions ( #3102 )
1 year ago
Haled Odat
610cf2c3c8
Use `Rc` instead of `Gc` for `CompileTimeEnvironment`s ( #3025 )
...
* Use `Rc` instead of `Gc` for `CompileTimeEnvironment`s
* Add comment
1 year ago
José Julián Espina
73a718c8a4
Add convenience methods to `ModuleLoader` ( #3007 )
...
* Add convenience methods to `ModuleLoader`
* Document special behaviour of `SimpleModuleLoader`
2 years ago
José Julián Espina
2fa9c65e97
Correctly initialize functions inside modules ( #2993 )
2 years ago
José Julián Espina
65bf54d7e0
Fix WASM playground ( #2992 )
2 years ago
José Julián Espina
7ae858204b
Implement pseudo-property `import.meta` ( #2956 )
...
* Implement pseudo-property `import.meta`
* Apply review
2 years ago
José Julián Espina
9bbe0184a4
Fix remaining static module bugs ( #2955 )
...
* Fix remaining module bugs
* npx prettier
* Fix regression
2 years ago
José Julián Espina
09658b02bc
Implement dynamic imports ( #2932 )
...
* WIP: 76d7eceed6 Implement dynamic imports
* Expand `ActiveRunnable` to missing places
* Fix memory leak
* Fix docs
* Parse `import` as call expression
* Fix regressions
* Fix copypasted doc
* clippy fix
* Adjust ignored features
* Migrate away from `top_level_*` operations
* Fix more module tests
* Fix doc link
2 years ago
raskad
4a368a2431
Fix `use_self` lints ( #2946 )
2 years ago
José Julián Espina
06161edcbd
Implement module execution ( #2922 )
...
* Implement draft of module execution
* Fix recursion bug
* Re-enable JsObject's debug printing
* Modify API and document some methods
* Add missing documentation
* Add newline to module scripts
* npx prettier
* Apply reviews
* Add reference to parent struct on source module
* Document more steps on the example
* cargo clippy
* Revert `BoaGc` changes
* Lower `GcRefCell` to `Inner` of `SourceTextModule`
* Replace weak ref to module with strong ref
* Apply review
* Clarify reasoning of manual `Trace` impl
* Apply review pt. 2
* Revert gc changes
2 years ago