ssm-lang / sslang

A language built atop the Sparse Synchronous Model
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

Support break statements #165

Open j-hui opened 1 year ago

j-hui commented 1 year ago

The code and syntax for this is actually already there ("completed" in 152d9943365ce8bdee2e58eb2a0370bd53005c29), but I took it out in 669814eb0ae33d462cebb60cd75511d2c4efd98b.

The problem is break completely breaks (ROFL) reference counting, because break ing out of a loop forgoes any inserted drops. The fix might be to rewrite how codegen handles loops, or to rewrite how codegen handles drops. We may even need to rewrite most of codegen.