oxc/crates/oxc_parser
Ali Rezvani 6c8296164e
perf(ast): box typescript enum variants. (#3065)
Similar to #3058 and #3061 it is a continuation of #3047.

Handles these enum types:

> TSEnumMemberName
> Variant sizes: 16, 24, 24, 40
> Unboxed variants: IdentifierName (struct), StringLiteral (struct),
NumericLiteral (struct)
> Dependents: TSEnumMember (struct)
> => Box all variants.
>
> TSModuleReference 
> Variant sizes: 16, 32
> Unboxed variants: TSExternalModuleReference (struct)
> Dependents: Box<TSModuleReference> in TSImportEqualsDeclaration
> => Box all variants. Replace Box<TSModuleReference> with
TSModuleReference in TSImportEqualsDeclaration.
>
> TSTypePredicateName 
> Variant sizes: 8, 24
> Unboxed variants: IdentifierName (struct), TSThisType (struct)
> Dependents: TSTypePredicate (struct)
> => Box Identifier variant. Do not box This variant as only 8 bytes
(just contains Span).
>
> TSTypeQueryExprName 
> Variant sizes: 16, 88
> Unboxed variants: TSImportType (struct)
> Dependents: TSTypeQuery (struct)
> => Box TSImportType variant. Do not box TSTypeName variant, as is
another enum.
2024-04-22 09:54:53 +08:00
..
examples Make ast types covariant over the allocator lifetime. (#2943) 2024-04-12 18:12:18 +08:00
src perf(ast): box typescript enum variants. (#3065) 2024-04-22 09:54:53 +08:00
Cargo.toml Release crates v0.12.4 2024-04-19 16:40:05 +08:00
CHANGELOG.md Release crates v0.12.3 2024-04-11 16:18:17 +08:00