Fix: revert optimizations

This commit is contained in:
2026-02-23 00:51:01 +01:00
parent f47285385c
commit 009d68087d
20 changed files with 134 additions and 377 deletions

View File

@@ -98,7 +98,7 @@ fn dur_is_step_duration() {
fn cycle_picks_by_runs() {
for runs in 0..4 {
let ctx = ctx_with(|c| c.runs = runs);
let mut f = forth();
let f = forth();
let outputs = f.evaluate(r#""kick" s { . } { } 2 cycle"#, &ctx).unwrap();
if runs % 2 == 0 {
assert_eq!(outputs.len(), 1, "runs={}: emit should be picked", runs);
@@ -112,7 +112,7 @@ fn cycle_picks_by_runs() {
fn pcycle_picks_by_iter() {
for iter in 0..4 {
let ctx = ctx_with(|c| c.iter = iter);
let mut f = forth();
let f = forth();
let outputs = f.evaluate(r#""kick" s { . } { } 2 pcycle"#, &ctx).unwrap();
if iter % 2 == 0 {
assert_eq!(outputs.len(), 1, "iter={}: emit should be picked", iter);
@@ -126,7 +126,7 @@ fn pcycle_picks_by_iter() {
fn cycle_with_sounds() {
for runs in 0..3 {
let ctx = ctx_with(|c| c.runs = runs);
let mut f = forth();
let f = forth();
let outputs = f.evaluate(
r#"{ "kick" s . } { "hat" s . } { "snare" s . } 3 cycle"#,
&ctx
@@ -194,7 +194,7 @@ fn clear_resets_at_deltas() {
fn at_records_selected_spans() {
use cagire::forth::ExecutionTrace;
let mut f = forth();
let f = forth();
let mut trace = ExecutionTrace::default();
let script = r#"0 0.5 0.75 at "kick" s ."#;
f.evaluate_with_trace(script, &default_ctx(), &mut trace).unwrap();