mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-20 13:48:48 +00:00
Pattern matching in X86
This commit is contained in:
parent
9f8391607d
commit
bbe403de26
18 changed files with 179 additions and 3 deletions
|
|
@ -94,7 +94,7 @@ open SM
|
|||
of x86 instructions
|
||||
*)
|
||||
let compile env code =
|
||||
SM.print_prg code;
|
||||
(*SM.print_prg code;*)
|
||||
flush stdout;
|
||||
let suffix = function
|
||||
| "<" -> "l"
|
||||
|
|
@ -351,10 +351,10 @@ class env =
|
|||
method drop_barrier = {< barrier = false >}
|
||||
|
||||
(* associates a stack to a label *)
|
||||
method set_stack l = Printf.printf "Setting stack for %s\n" l; {< stackmap = M.add l stack stackmap >}
|
||||
method set_stack l = (*Printf.printf "Setting stack for %s\n" l;*) {< stackmap = M.add l stack stackmap >}
|
||||
|
||||
(* retrieves a stack for a label *)
|
||||
method retrieve_stack l = Printf.printf "Retrieving stack for %s\n" l;
|
||||
method retrieve_stack l = (*Printf.printf "Retrieving stack for %s\n" l;*)
|
||||
try {< stack = M.find l stackmap >} with Not_found -> self
|
||||
|
||||
(* gets a name for a global variable *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue