Minor polishing

Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
Kakadu 2024-09-05 18:32:06 +03:00
parent 39fa6c2be9
commit 0ccc1c6e7d
9 changed files with 42 additions and 50 deletions

1
src/.ocamlformat-ignore Normal file
View file

@ -0,0 +1 @@
X86_32.ml

View file

@ -1,6 +1,5 @@
open GT
open Language
open SM
(* X86 codegeneration interface *)
@ -241,7 +240,7 @@ let compile cmd env imports code =
match instr with
| PUBLIC name -> env#register_public name, []
| EXTERN name -> env#register_extern name, []
| IMPORT name -> env, []
| IMPORT _name -> env, []
| CLOSURE (name, closure) ->
let pushr, popr =
@ -691,7 +690,7 @@ class env prg =
(* tag hash: gets a hash for a string tag *)
method hash tag =
let h = Pervasives.ref 0 in
let h = Stdlib.ref 0 in
for i = 0 to min (String.length tag - 1) 4 do
h := (!h lsl 6) lor (String.index chars tag.[i])
done;

View file

@ -76,11 +76,9 @@
(executable
(name Driver)
(public_name lamac)
(flags
(:standard
-rectypes
;-dsource
))
(:standard -rectypes))
(modules Driver)
(libraries liba unix))