X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/1144856ba9d6018d9922c6ede7e97779a0fe6373..6c5506c5b97dabd72ba38c1f033dc4fded52cbfd:/codegen/stringifier.sml diff --git a/codegen/stringifier.sml b/codegen/stringifier.sml index 5010d7b..6124a55 100644 --- a/codegen/stringifier.sml +++ b/codegen/stringifier.sml @@ -6,22 +6,22 @@ signature STRINGIFY = sig - type asm = x86.insn list + type asm = Blarg.insn list val stringify : (string -> string) -> asm -> string end structure Stringify :> STRINGIFY = struct - type asm = x86.insn list - structure X = x86 + type asm = Blarg.insn list + structure X = Blarg (* val stringify : asm -> string * turns a x86 instruction list into a string of assembly code for these instructions *) - fun stringify' rn (X.CALL (l, n)) = X.prettyprint (X.CALL ((Symbol.symbol (rn (Symbol.name l))), n)) - | stringify' rn x = X.prettyprint x + fun (*stringify' rn (X.CALL (l, n)) = X.print (X.CALL ((Symbol.symbol (rn (Symbol.name l))), n)) + | *)stringify' rn x = X.print x (* val stringify : asm -> string *) - fun stringify realname l = foldr (fn (a,b) => (stringify' realname a) ^ b) ("") l + fun stringify realname l = String.concat (List.map (stringify' realname) l) end