You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.
Recursive Fibonacci is a nice next milestone because it needs some control flow operators and calls, which should really help establish the shape of the backend.
The steps are:
Implement if+else+end.
We'll need a stack for tracking nested control flow constructs. To start with there's only one kind of control-flow stack entry, for if/else/end, but eventually we'll have more. It can hold DynamicLables to keep track of the labels for branching.
The result value of an if can be carried by the stack just like normal operator results. (For now; later with on-the-fly register allocation it can be more sophisticated.)
Implement calls
This is a good time to generalize the handling of function signatures. I think we can just collect all the FuncTypes from the type section into a Vec and pass that around for now.
Optionally, to keep things simple for this step, we could limit support to just 6 integer arguments, to avoid having to deal with stack arguments just yet.
I've left out a lot of the low-level details here; feel free to ask for more detail!
The text was updated successfully, but these errors were encountered:
Recursive Fibonacci is a nice next milestone because it needs some control flow operators and calls, which should really help establish the shape of the backend.
The steps are:
if
+else
+end
.DynamicLable
s to keep track of the labels for branching.if
can be carried by the stack just like normal operator results. (For now; later with on-the-fly register allocation it can be more sophisticated.)FuncType
s from the type section into aVec
and pass that around for now.I've left out a lot of the low-level details here; feel free to ask for more detail!
The text was updated successfully, but these errors were encountered: