Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(transformer): rename AString to ArenaString #6997

Merged
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
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/common/helper_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ use std::{borrow::Cow, cell::RefCell};
use rustc_hash::FxHashMap;
use serde::Deserialize;

use oxc_allocator::{String as AString, Vec};
use oxc_allocator::{String as ArenaString, Vec};
use oxc_ast::ast::{Argument, CallExpression, Expression, TSTypeParameterInstantiation};
use oxc_semantic::{ReferenceFlags, SymbolFlags};
use oxc_span::{Atom, SPAN};
Expand Down Expand Up @@ -247,7 +247,7 @@ impl<'a> HelperLoaderStore<'a> {

// Construct string directly in arena without an intermediate temp allocation
let len = self.module_name.len() + "/helpers/".len() + helper_name.len();
let mut source = AString::with_capacity_in(len, ctx.ast.allocator);
let mut source = ArenaString::with_capacity_in(len, ctx.ast.allocator);
source.push_str(&self.module_name);
source.push_str("/helpers/");
source.push_str(helper_name);
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_transformer/src/es2022/class_static_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

use itoa::Buffer as ItoaBuffer;

use oxc_allocator::String as AString;
use oxc_allocator::String as ArenaString;
use oxc_ast::{ast::*, Visit, NONE};
use oxc_semantic::SymbolTable;
use oxc_span::SPAN;
Expand Down Expand Up @@ -295,7 +295,7 @@ impl<'a> Keys<'a> {
i += 1;
}

let mut key = AString::with_capacity_in(num_str.len() + 1, ctx.ast.allocator);
let mut key = ArenaString::with_capacity_in(num_str.len() + 1, ctx.ast.allocator);
key.push('_');
key.push_str(num_str);
let key = Atom::from(key.into_bump_str());
Expand Down
Loading