Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/oxc_allocator/src/hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type FxHashMap<'alloc, K, V> = hashbrown::HashMap<K, V, FxBuildHasher, &'alloc B
/// a [`HashMap`] will refuse to compile if either key or value is a [`Drop`] type.
///
/// [`FxHasher`]: rustc_hash::FxHasher
#[derive(Debug)]
pub struct HashMap<'alloc, K, V>(ManuallyDrop<FxHashMap<'alloc, K, V>>);

/// SAFETY: Even though `Bump` is not `Sync`, we can make `HashMap<K, V>` `Sync` if both `K` and `V`
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ bitflags = { workspace = true }
cow-utils = { workspace = true }
nonmax = { workspace = true }
phf = { workspace = true, features = ["macros"] }
rustc-hash = { workspace = true }
unicode-id-start = { workspace = true }

dragonbox_ecma = { workspace = true, optional = true }
Expand Down
12 changes: 5 additions & 7 deletions crates/oxc_syntax/src/module_record.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! [ECMAScript Module Record](https://tc39.es/ecma262/#sec-abstract-module-records)

use rustc_hash::FxHashMap;

use oxc_allocator::{Allocator, Vec};
use oxc_allocator::{Allocator, HashMap, Vec};
use oxc_ast_macros::ast;
use oxc_estree::ESTree;
use oxc_span::{Atom, Span};
Expand All @@ -29,7 +27,7 @@ pub struct ModuleRecord<'a> {
/// export ExportFromClause FromClause
///
/// Keyed by ModuleSpecifier, valued by all node occurrences
pub requested_modules: FxHashMap<Atom<'a>, Vec<'a, RequestedModule>>,
pub requested_modules: HashMap<'a, Atom<'a>, Vec<'a, RequestedModule>>,

/// `[[ImportEntries]]`
///
Expand Down Expand Up @@ -57,7 +55,7 @@ pub struct ModuleRecord<'a> {
pub star_export_entries: Vec<'a, ExportEntry<'a>>,

/// Local exported bindings
pub exported_bindings: FxHashMap<Atom<'a>, Span>,
pub exported_bindings: HashMap<'a, Atom<'a>, Span>,

/// Dynamic import expressions `import(specifier)`.
pub dynamic_imports: Vec<'a, DynamicImport>,
Expand All @@ -71,12 +69,12 @@ impl<'a> ModuleRecord<'a> {
pub fn new(allocator: &'a Allocator) -> Self {
Self {
has_module_syntax: false,
requested_modules: FxHashMap::default(),
requested_modules: HashMap::new_in(allocator),
import_entries: Vec::new_in(allocator),
local_export_entries: Vec::new_in(allocator),
indirect_export_entries: Vec::new_in(allocator),
star_export_entries: Vec::new_in(allocator),
exported_bindings: FxHashMap::default(),
exported_bindings: HashMap::new_in(allocator),
dynamic_imports: Vec::new_in(allocator),
import_metas: Vec::new_in(allocator),
}
Expand Down
10 changes: 5 additions & 5 deletions tasks/track_memory_allocations/allocs_parser.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
File | File size || Sys allocs | Sys reallocs || Arena allocs | Arena reallocs | Arena bytes
-------------------------------------------------------------------------------------------------------------------------------------------
checker.ts | 2.92 MB || 10161 | 21 || 268665 | 23341
checker.ts | 2.92 MB || 10157 | 21 || 268665 | 23341

cal.com.tsx | 1.06 MB || 2213 | 54 || 138188 | 13712
cal.com.tsx | 1.06 MB || 2197 | 54 || 138188 | 13712

RadixUIAdoptionSection.jsx | 2.52 kB || 4 | 0 || 365 | 66
RadixUIAdoptionSection.jsx | 2.52 kB || 1 | 0 || 365 | 66

pdf.mjs | 567.30 kB || 688 | 71 || 90678 | 8148
pdf.mjs | 567.30 kB || 683 | 71 || 90678 | 8148

antd.js | 6.69 MB || 6938 | 236 || 528505 | 55357

binder.ts | 193.08 kB || 540 | 7 || 16807 | 1475
binder.ts | 193.08 kB || 537 | 7 || 16807 | 1475

Loading