-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
So asm-interp goes to a little bit of trouble to add in any missing pieces to make the code it's given runnable. For example, if you don't define any labels, it will invent one at the start of the instructions and call it.
We don't currently do something similar for the Ret, which is needed in order to return a value back from the interpreter. This leads to crashes when students forget to add a Ret. Should we just insert one on at the end unconditionally? I don't see any harm in doing this, other than not forcing students to think about the return instruction, which will be needed in their compiler. If we also added an implicit seq, you could then write things like (asm-interp (Mov rax 42)) => 42, which is maybe nice to have.
Metadata
Metadata
Assignees
Labels
No labels