mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
perf(parser): use FxHashSet for not_parenthesized_arrow (#3344)
This commit is contained in:
parent
899a52bf28
commit
46cb5f97a0
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
use std::collections::HashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use oxc_allocator::{Allocator, Vec};
|
use oxc_allocator::{Allocator, Vec};
|
||||||
use oxc_ast::ast::Decorator;
|
use oxc_ast::ast::Decorator;
|
||||||
|
|
@ -6,7 +6,7 @@ use oxc_ast::ast::Decorator;
|
||||||
pub struct ParserState<'a> {
|
pub struct ParserState<'a> {
|
||||||
allocator: &'a Allocator,
|
allocator: &'a Allocator,
|
||||||
|
|
||||||
pub not_parenthesized_arrow: HashSet<u32>,
|
pub not_parenthesized_arrow: FxHashSet<u32>,
|
||||||
|
|
||||||
pub decorators: Vec<'a, Decorator<'a>>,
|
pub decorators: Vec<'a, Decorator<'a>>,
|
||||||
}
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ impl<'a> ParserState<'a> {
|
||||||
pub fn new(allocator: &'a Allocator) -> Self {
|
pub fn new(allocator: &'a Allocator) -> Self {
|
||||||
Self {
|
Self {
|
||||||
allocator,
|
allocator,
|
||||||
not_parenthesized_arrow: HashSet::new(),
|
not_parenthesized_arrow: FxHashSet::default(),
|
||||||
decorators: Vec::new_in(allocator),
|
decorators: Vec::new_in(allocator),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue