mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
fix(es/parser): Don't use stacker
for armv7 (#6916)
This commit is contained in:
parent
4be6c33687
commit
4c5d5a6fca
@ -37,7 +37,7 @@ swc_ecma_visit = { version = "0.82.3", path = "../swc_ecma_visit", optional = tr
|
||||
tracing = "0.1.32"
|
||||
typed-arena = "2.0.1"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
[target.'cfg(not(any(target_arch = "wasm32", target_arch = "arm")))'.dependencies]
|
||||
stacker = "0.1.15"
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -448,11 +448,13 @@ expose!(parse_file_as_script, Script, |p| { p.parse_script() });
|
||||
expose!(parse_file_as_program, Program, |p| { p.parse_program() });
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg_attr(target_arch = "wasm32", allow(unused))]
|
||||
fn maybe_grow<R, F: FnOnce() -> R>(red_zone: usize, stack_size: usize, callback: F) -> R {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
return callback();
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
return stacker::maybe_grow(red_zone, stack_size, callback);
|
||||
#[cfg(any(target_arch = "wasm32", target_arch = "arm"))]
|
||||
fn maybe_grow<R, F: FnOnce() -> R>(_red_zone: usize, _stack_size: usize, callback: F) -> R {
|
||||
callback()
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[cfg(not(any(target_arch = "wasm32", target_arch = "arm")))]
|
||||
fn maybe_grow<R, F: FnOnce() -> R>(red_zone: usize, stack_size: usize, callback: F) -> R {
|
||||
stacker::maybe_grow(red_zone, stack_size, callback)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user