All you are doing this week is completing your code generator. We’re revisiting code from module 6, and almost nothing is new.
Code you will look at and understand
asmutil.sml
This file is extended with four new utility functions:
return
,call
,tailcall
, andareConsecutive
.primitives.sml
You’ll see how to pattern match on a primitive to find out if it sets a register or is run only for side effect.
Code you will write or edit
codegen.sml
You’ll finish your code generator.