Commit Graph

21 Commits

Author SHA1 Message Date
Zachary Snow 72ab639699 forbid non-void return inside void functions 2022-12-23 19:55:44 -07:00
Zachary Snow b7a2327668 simple for loop elaboration applies in more cases 2022-04-30 20:19:02 -06:00
Zachary Snow 4ced649a87 convert do while loops 2022-03-11 11:32:54 +01:00
Zachary Snow 30acc3e3f9 fix spacing of as-patterns for future GHC upgrade 2021-08-12 16:13:12 -06:00
Zachary Snow bfd0cee0dc improved handling of procedural for loops
- convert loops with no or many incrementations
- restrict AST node to only contain traditional initializations
- parser elaborates for loop decls into a synthetic block
- decl list codegen is now specific to parameter decl lists
- update jump conversion special cases for new representation
- first experiments with bimapM
2021-07-14 15:50:12 -04:00
Zachary Snow 9de4a3c99c simplify type and decl traversals 2021-06-30 19:13:44 -04:00
Zachary Snow 44afcf5b29 improved handling of break statement
- fix preservation of loop variables when breaking
- extend Yosys-compatible constant loop conversion to support loop
  variables declared outside of the looop
2021-04-14 13:16:27 -04:00
Zachary Snow 38cc25fad6 more test coverage and dead code removal 2021-03-09 15:48:10 -05:00
Zachary Snow 937a583e41 fix simple loop jump guarded conversion 2021-03-09 12:42:34 -05:00
Zachary Snow d847fdfaca split phases into sections 2021-02-08 12:42:34 -05:00
Zachary Snow e4135bb896 use strict State and Writer monads 2020-08-11 19:14:18 -04:00
Zachary Snow 50d6faa9b0 yosys-compatible simple loop jump conversion 2020-07-27 18:50:26 -06:00
Zachary Snow f0a5a47371 fix break/continue causing return after loop 2020-07-23 19:04:20 -06:00
Zachary Snow d88c516d33 enhanced handling of number literals
- number literals are parsed rather than stored as strings
- fix array query functions used on non-trivial number literals
- more efficient expression simplification recursion
- expanded constant folding scenarios
2020-07-12 15:06:27 -06:00
Zachary Snow 12be569742 reduce usage of maybe 2020-06-14 15:56:09 -04:00
Zachary Snow 7a00c36a70 jump conversion keeps timing controls at the top level 2020-02-09 11:53:21 -05:00
Zachary Snow 9694799a23 more consistent procedural assignment support 2020-02-01 15:52:52 -05:00
Zachary Snow 7f2fe54b11 fix jump statement conversion 2019-12-09 21:17:01 -05:00
Zachary Snow 96fe986b2d cleanup case representation 2019-12-01 23:25:33 -05:00
Zachary Snow eebe41427e language support for final blocks 2019-10-31 20:39:11 -04:00
Zachary Snow 8ae89a7bd4 support and convert jumps: break, continue, and return 2019-10-08 23:50:26 -04:00