ForNeVeR / ForNeVeR/Cesium

Improve the compilation pipeline (introduce stages)

Open
#201 11 comments 0 reactions 1 assignee Claimed by @ForNeVeR View on GitHub
area:compiler kind:refactor
Dominant language
C#
Stars
451
Forks
49
Avg merge
13h 59m
Merged PRs (30d)
6

Description

For now, we have somewhat messed up pipeline: the IR nodes do all by themselves. Type checking, member resolve, lowering, codegen: we have everything everywhere. Right now, only parsing is properly isolated from everything else.

We should introduce more formal stages of compilation and _maybe_ even create several different layers of IR? For example, we have certain constructs that have to be lowered (such as `+=`-styled operators). We may get rid of these constructs in the "lowered IR layer" and thus decrease the amount of type checks required in the codegen.

I don't know how should it be organized, though. Just start from separating the IR layers, and everything else will click and fit in place?

Thoughts?

cc @kant2002, @impworks

When implementing, look for number `201` in the source and try to eliminate every instance of that number.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.