mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
This PR aims to provide a more accurate error/finalization flow, I've nuked the old error path approach and rewrote it with more versatility in mind. We used to visit the finalizer block twice and create 2 sets of AstNodes/Basic Blocks for them, This was there to differentiate between the error path finalizer and success path one. There is no longer a need for having 2 separate sets of nodes to do this differentiation. As for the error path now we have 2 kinds of them, Everything is attached to an error block - even if it is not in a try-catch statement - this results in a lot of extra edges to keep track of these "Implicit" error blocks but I believe in future it can help us to track cross block error paths, For example, we can dynamically attach and cache the implicit error block of a function to its call site error path (either implicit or explicit). |
||
|---|---|---|
| .. | ||
| misc | ||
| src | ||
| Cargo.toml | ||
| codegen_babel.snap | ||
| codegen_misc.snap | ||
| codegen_runtime_test262.snap | ||
| codegen_sourcemap.snap | ||
| codegen_test262.snap | ||
| codegen_typescript.snap | ||
| minifier_babel.snap | ||
| minifier_test262.snap | ||
| parser_babel.snap | ||
| parser_misc.snap | ||
| parser_test262.snap | ||
| parser_typescript.snap | ||
| prettier_babel.snap | ||
| prettier_misc.snap | ||
| prettier_test262.snap | ||
| prettier_typescript.snap | ||
| README.md | ||
| transformer_babel.snap | ||
| transformer_misc.snap | ||
| transformer_test262.snap | ||
| transformer_typescript.snap | ||
Coverage
Tools are tested against test262, babel and TypeScript for conformance.
Clone the test repositories beforehand:
just submodules
Development
# full run
cargo coverage
cargo coverage js # for test262
cargo coverage babel # for babel
cargo coverage ts # for typescript
# run in watch
cargo watch -x 'coverage js'
# filter for a file path
cargo watch -x 'coverage js --filter filter-file-path'
# find crash scene by turning off rayon and print out the test cases in serial
cargo coverage -- --debug
# Run after submodules are updated
UPDATE_SNAPSHOT=1 just c