refactor(transformer): rename AString to ArenaString (#6997)

Part of #6996.
This commit is contained in:
overlookmotel 2024-10-29 13:00:48 +00:00
parent 9fd9f4f5b9
commit 63e8bfeeec
2 changed files with 4 additions and 4 deletions

View file

@ -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};
@ -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);

View file

@ -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;
@ -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());