oxc/crates
overlookmotel ac910eea5e refactor(transformer/class-properties): move code out of transform_assignment_target (#7701)
Follow-on after #7697.

`transform_assignment_target` is inlined into `enter_assignment_target` visitor, so we want it to be as small as possible. Move assigning to `target` into `transform_assignment_target_impl`, which is the cold path.

The principle is that in the transformer the most important thing for performance is to optimize for the path which is "nothing to do here, exit".

Here we are only transforming `object.#prop`, but very few `AssignmentTarget`s are `object.#prop`, so 99% of the time there is nothing to do. So we want to keep that "do nothing and exit" path as fast and small as possible.

In practice, the `*target =` assignment is only a single assembly operation, so this PR is a micro-optimization. But why not? Every little helps.
2024-12-06 15:15:28 +00:00
..
oxc release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_allocator release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_ast fix(estree): make type of BigIntLiteral::raw prop in ESTree AST optional (#7663) 2024-12-05 04:00:57 +00:00
oxc_ast_macros release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_cfg release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_codegen feat(codegen): minify whitespace for some expressions (#7671) 2024-12-05 06:59:17 +00:00
oxc_data_structures release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_diagnostics release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_ecmascript release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_estree release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_isolated_declarations refactor(ast)!: change 'raw' from &str to Option<Atom> (#7547) 2024-12-05 00:34:45 +00:00
oxc_language_server refactor(linter): add capability of adding semantic data to module record (#7561) 2024-12-01 08:14:43 +00:00
oxc_linter release(oxlint): v0.14.1 (#7692) 2024-12-06 13:06:54 +08:00
oxc_macros feat(linter): allow lint rules with the same name (#7496) 2024-11-27 04:25:05 +00:00
oxc_mangler release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_minifier refactor(ast)!: change 'raw' from &str to Option<Atom> (#7547) 2024-12-05 00:34:45 +00:00
oxc_parser feat(napi/parser): expose span positions of import.meta (#7677) 2024-12-05 11:03:52 +00:00
oxc_prettier refactor(ast)!: change 'raw' from &str to Option<Atom> (#7547) 2024-12-05 00:34:45 +00:00
oxc_regular_expression release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_semantic refactor(ast)!: change 'raw' from &str to Option<Atom> (#7547) 2024-12-05 00:34:45 +00:00
oxc_span release(crates): v0.39.0 (#7643) 2024-12-04 19:43:22 +08:00
oxc_syntax feat(napi/parser): expose span positions of import.meta (#7677) 2024-12-05 11:03:52 +00:00
oxc_transformer refactor(transformer/class-properties): move code out of transform_assignment_target (#7701) 2024-12-06 15:15:28 +00:00
oxc_traverse feat(traverse): add TraverseCtx::generate_uid_in_current_hoist_scope_based_on_node (#7642) 2024-12-05 13:41:43 +00:00
oxc_wasm refactor(linter): add capability of adding semantic data to module record (#7561) 2024-12-01 08:14:43 +00:00