mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
add it back
This commit is contained in:
parent
13e0656df6
commit
7b881c0013
2 changed files with 4 additions and 2 deletions
|
@ -37,7 +37,9 @@ where
|
||||||
E: Clone,
|
E: Clone,
|
||||||
{
|
{
|
||||||
let allocator = Allocator::default();
|
let allocator = Allocator::default();
|
||||||
let source_type = SourceType::default();
|
let source_type = SourceType::unambiguous()
|
||||||
|
.with_javascript(true)
|
||||||
|
.with_standard(true);
|
||||||
let ret = Parser::new(&allocator, js, source_type)
|
let ret = Parser::new(&allocator, js, source_type)
|
||||||
.with_options(ParseOptions {
|
.with_options(ParseOptions {
|
||||||
parse_regular_expression: false, // default
|
parse_regular_expression: false, // default
|
||||||
|
|
|
@ -29,7 +29,7 @@ sed -i 's/import.meta.url/""/g' out/wasm.js
|
||||||
|
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
wasm-snip rewriter/wasm/out/wasm_bg.wasm -o rewriter/wasm/out/wasm_snipped.wasm -p 'oxc_regular_expression::.*' -p 'oxc_parser::ts::.*'
|
wasm-snip rewriter/wasm/out/wasm_bg.wasm -o rewriter/wasm/out/wasm_snipped.wasm -p 'oxc_regular_expression::.*'
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
time wasm-opt $WASMOPTFLAGS --converge -tnh -O4 --vacuum --dce --enable-threads --enable-bulk-memory --enable-simd rewriter/wasm/out/wasm_snipped.wasm -o rewriter/wasm/out/optimized.wasm
|
time wasm-opt $WASMOPTFLAGS --converge -tnh -O4 --vacuum --dce --enable-threads --enable-bulk-memory --enable-simd rewriter/wasm/out/wasm_snipped.wasm -o rewriter/wasm/out/optimized.wasm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue