Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attributes for components and implement counter_fsm attribute #453

Merged
merged 13 commits into from
Sep 4, 2024
Prev Previous commit
Next Next commit
disable fsm attrs for externals
  • Loading branch information
UnsignedByte committed Sep 4, 2024
commit ddb1eb05efc0b3bfd21e3325cac4d6ad71c15132
5 changes: 5 additions & 0 deletions crates/filament/src/ir_passes/fsm_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ impl Visitor for FSMAttributes {
return;
}

// If the component is external or generated, do not add any slow FSM attributes
if data.comp.is_ext() || data.comp.is_gen() {
return;
}

// Get the delay of the component if it is a single event component
if data.comp.events().len() == 1 {
let delay = &data.comp.events().iter().next().unwrap().1.delay;
Expand Down