#28ensure all passes do not suffer from stack overflow issues

  • avatar~clovercommented · 2 years ago
    Author
    Owner

    most of the compiler is built on recursive functions. this is a tracking issue to have tests that inputs do not crash or panic any component of the compiler.

    inherently low priority but something to block a 1.0 release

    • [x] parsing
    • [x] transform
    • [ ] sema
    • [ ] lowering
    • [ ] printing

    Milestone: later.

  • avatar~clover changed the status to Todo · 2 years ago
  • avatar~clovercommented · 2 years ago
    Author
    Owner

    this might not be worthwhile, and instead just define there to be some large maximum scope limit, such as 8192 nested blocks.

    i think that would be a reasonable limit. i will check those off after i implement that check.

    if this was adopted, then we would know that Ast contains less than such nesting, and transforming would be guarenteed to have a known upper bound of stack memory.

    semantic analysis will have a different approach, so this issue applies there

    printing is to be seen.