diff --git a/tasks/benchmark/benches/codegen.rs b/tasks/benchmark/benches/codegen.rs index a2c5ddfc8622e..13b6db9c650d0 100644 --- a/tasks/benchmark/benches/codegen.rs +++ b/tasks/benchmark/benches/codegen.rs @@ -19,7 +19,8 @@ fn bench_codegen(criterion: &mut Criterion) { assert!(parser_ret.errors.is_empty()); let mut program = parser_ret.program; - let scoping = SemanticBuilder::new().build(&program).semantic.into_scoping(); + let scoping = + SemanticBuilder::new().with_enum_eval(true).build(&program).semantic.into_scoping(); let transform_options = TransformOptions::enable_all(); let transformer_ret = diff --git a/tasks/benchmark/benches/minifier.rs b/tasks/benchmark/benches/minifier.rs index a9a4bef440cf8..37556485f373c 100644 --- a/tasks/benchmark/benches/minifier.rs +++ b/tasks/benchmark/benches/minifier.rs @@ -29,7 +29,11 @@ fn bench_minifier(criterion: &mut Criterion) { // Create fresh AST + semantic data for each iteration let mut program = Parser::new(&allocator, source_text, source_type).parse().program; - let scoping = SemanticBuilder::new().build(&program).semantic.into_scoping(); + let scoping = SemanticBuilder::new() + .with_enum_eval(true) + .build(&program) + .semantic + .into_scoping(); // Minifier only works on esnext. let transform_options = TransformOptions::from_target("esnext").unwrap(); diff --git a/tasks/benchmark/benches/pipeline.rs b/tasks/benchmark/benches/pipeline.rs index 5b44389ec713c..bec143e614874 100644 --- a/tasks/benchmark/benches/pipeline.rs +++ b/tasks/benchmark/benches/pipeline.rs @@ -43,6 +43,7 @@ fn bench_pipeline(criterion: &mut Criterion) { // Semantic let scoping = SemanticBuilder::new() .with_excess_capacity(2.0) + .with_enum_eval(true) .build(&program) .semantic .into_scoping(); diff --git a/tasks/benchmark/benches/transformer.rs b/tasks/benchmark/benches/transformer.rs index d6d69fc8fc4f4..3c1ea20351490 100644 --- a/tasks/benchmark/benches/transformer.rs +++ b/tasks/benchmark/benches/transformer.rs @@ -36,6 +36,7 @@ fn bench_transformer(criterion: &mut Criterion) { let scoping = SemanticBuilder::new() // Estimate transformer will triple scopes, symbols, references .with_excess_capacity(2.0) + .with_enum_eval(true) .build(&program) .semantic .into_scoping(); diff --git a/tasks/track_memory_allocations/src/lib.rs b/tasks/track_memory_allocations/src/lib.rs index c86ba04d9fc41..11dd3359aff70 100644 --- a/tasks/track_memory_allocations/src/lib.rs +++ b/tasks/track_memory_allocations/src/lib.rs @@ -153,7 +153,11 @@ pub fn run() -> Result<(), io::Error> { assert!(parsed.errors.is_empty()); // Transform TypeScript to ESNext before minifying (minifier only works on esnext) - let scoping = SemanticBuilder::new().build(&parsed.program).semantic.into_scoping(); + let scoping = SemanticBuilder::new() + .with_enum_eval(true) + .build(&parsed.program) + .semantic + .into_scoping(); let transform_options = TransformOptions::from_target("esnext").unwrap(); let _ = Transformer::new(&allocator, std::path::Path::new(&file.file_name), &transform_options) @@ -194,7 +198,11 @@ pub fn run() -> Result<(), io::Error> { )); let (scoping, semantic_stats) = record_stats_in(&allocator, || { - SemanticBuilder::new().build(&parsed.program).semantic.into_scoping() + SemanticBuilder::new() + .with_enum_eval(true) + .build(&parsed.program) + .semantic + .into_scoping() }); semantic_out.push_str(&format_table_row(