Skip to content

Switch to C backend #7

@thomasvergne

Description

@thomasvergne

This issue aims at transforming Bonzai to provide a C backend implementation. This would change the followings things:

  • Easier runtime tests: because code would depend on C compiler
  • Less easy backend: this feature would imply compiler updates such as new passes
  • Better performance: no VM overhead

Considering this, the following passes should be added:

  • Typed conversion from High Level IR to Typed Medium-Level IR
  • Actor conversion, to convert actors, spawn, and event sending to their low-level representation: Partially implemented
  • Monomorphization, to "remove" generic data types and functions
  • Typed closure conversion, to remove every in-scope lambdas
  • Typed closure hoisting, to move lambdas to top-level
  • ANF conversion, to simplify expression representation and remove complex, or error-friendly structures
  • CLang CFG conversion, to transform ternary expressions into statements
  • CLang code generation

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions