- We don't need a list of bindings to check if an identifier is unresolved.
- Checking if an identifier is unresolved is now one CPU instruction.
- Previously it was one hashmap operation.
- This PR also improves performance, by removing the hashmaps mentioned above.
- We now check if there's pending inlining before remapping variables.
- We now use ad-hoc type for remapping.
- We now inline before remapping to prevent interference with inlining.
swc_ecma_minifier:
- `pure`: Add an optional list of bindings.
- `pure`: Drop identifier only if we have the complete list of bindings.
- `pure`: Allow using `GLOBALS`.
- `pure`: Drop some pure member expressions.
- Move identifier dropping logic from the stateful optimizer to the pure optimizer.
- `pure`: Drop more references to global declarations.
swc_ecma_transforms_base:
- `resolver`: Ignore named export with source.
- `hygiene`: Ignore named export with source. (Closes#2924, Closes#3114)
swc_ecma_minifier:
- Handle `export default` declarations as declaration instead of expressions. (Closes#2717)
- Don't override already-processed identifiers. (Closes#2988)
swc_bundler:
- Adjust the syntax context for named re-exports.