oxc/crates
overlookmotel 6a49dc36b2 perf(wasm): generate scope text with visitor (#5264)
Follow-on after #5232. `oxc_wasm` build scopes text with a single AST traversal. Previous implementation was O($n^2$).

If we can assume scopes are listed in traversal order, then we could do it a bit more efficiently just from `ScopeTree`, but this approach of using `Visit` will handle out-of-order scope IDs (which you'd get if printing a post-transform `ScopeTree`).

Also reduce creating and discarding `String`s for indentation - reuse a single string instead.
2024-08-27 13:49:42 +00:00
..
oxc
oxc_allocator
oxc_ast chore: switch playground to https://github.com/oxc-project/playground (#5249) 2024-08-27 15:14:36 +08:00
oxc_ast_macros
oxc_cfg
oxc_codegen perf(codegen): inline Codegen::print_list (#5221) 2024-08-26 10:28:49 +00:00
oxc_diagnostics
oxc_index
oxc_isolated_declarations
oxc_language_server
oxc_linter fix(linter/no-null): incorrect fixer for NullLiteral within ReturnStatement (#5247) 2024-08-27 03:51:56 +00:00
oxc_macros
oxc_mangler
oxc_minifier
oxc_module_lexer
oxc_parser refactor(parser): improve example for byte_search! macro usage (#5234) 2024-08-26 14:22:37 +00:00
oxc_prettier perf(wasm): reuse parse result for prettier (#5254) 2024-08-27 16:56:18 +08:00
oxc_regular_expression feat(regular_expression): Validate max quantifier value (#5218) 2024-08-26 07:11:04 +00:00
oxc_semantic refactor(semantic): combine add scope methods (#5262) 2024-08-27 13:00:21 +00:00
oxc_sourcemap
oxc_span feat(span/source-type): add SourceType factory methods (#5242) 2024-08-27 01:19:54 +00:00
oxc_syntax
oxc_transformer chore: bump rustc to v1.80.1 (#5211) 2024-08-26 13:11:29 +08:00
oxc_traverse refactor(semantic): combine add scope methods (#5262) 2024-08-27 13:00:21 +00:00
oxc_wasm perf(wasm): generate scope text with visitor (#5264) 2024-08-27 13:49:42 +00:00