chore(es/parser): Reduce pre-allocation to reduce memory usage (#6979)

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6966.
This commit is contained in:
IWANABETHATGUY 2023-02-22 22:17:45 +08:00 committed by GitHub
parent 6496796c59
commit f1e7a2a9cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -712,7 +712,7 @@ impl<I: Tokens> Parser<I> {
expect!(p, '(');
let mut first = true;
let mut expr_or_spreads = Vec::with_capacity(8);
let mut expr_or_spreads = Vec::with_capacity(2);
while !eof!(p) && !is!(p, ')') {
if first {