doc-src/Tutorial/CodeGen/exec
author berghofe
Thu, 23 Sep 2004 10:20:52 +0200
changeset 15204 d15f85347fcb
parent 5377 efb799c5ed3c
permissions -rw-r--r--
- Inserted additional check for equality types in check_mode_clause that avoids ill-typed code to be generated. - Mode inference algorithm now outputs additional diagnostic messages.

consts exec :: ('a => 'v) => 'v list => (('a,'v) instr) list => 'v list
primrec
"exec s vs [] = vs"
"exec s vs (i#is) = (case i of
    Const v  => exec s (v#vs) is
  | Load a   => exec s ((s a)#vs) is
  | Apply f  => exec s ( (f (hd vs) (hd(tl vs)))#(tl(tl vs)) ) is)"