lambdachine
lambdachine copied to clipboard
Make r0 = Node?
There's a lot of potential for off-by-one errors in the current code. In the interpreter R0 is at base[0]
, but in the codegen it is at [rbp + 8]
. A cleaner solution is probably to always have r0 = Node
. That way we also no longer need a special bytecode instruction for adding free variables (it's just loading a field from r0). Potential issues:
- Interaction with CALL[T]. Does it make tailcalls easier/harder? What about overapplication?
- Lots of changes to many places. Maybe do after #3?