... other functions (map), return from functions (compose), place in data structures. ... val compose = fn (f,g) = (fn x = f(g(x))) val id = compose(inc,dec) ...
Your task: build lexer and parser. using ML-Lex and Yacc. Today: Quick overview of the MIPS instruction set. We're going to be compiling to MIPS assembly language. ...
Build: construct the interference graph. label each node as move-related or not move-related. ... no longer interfere with any other temp, so remove their edges. ...
sw $2, 0($3) ; store value in x. First Problem: Nested Expr's. Source: ... For 'if (x == y) s1 else s2' we do a seq followed by a beq when we could just do ...
Each procedure is just a Fish program beginning with a label (the function name) ... Oops, what if f calls g and g calls h? g needs to save its return address. ...
Given: AST for a small, C-like ... Quick overview of the MIPS instruction set. ... Unconditional Jumps: j imm26 ; pc := (imm26 2) jr $rs ; pc := $rs ...