mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-29 01:58:48 +00:00
Minor polishing
Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
parent
39fa6c2be9
commit
0ccc1c6e7d
9 changed files with 42 additions and 50 deletions
1
src/.ocamlformat-ignore
Normal file
1
src/.ocamlformat-ignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
X86_32.ml
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
6
src/dune
6
src/dune
|
|
@ -76,11 +76,9 @@
|
|||
|
||||
(executable
|
||||
(name Driver)
|
||||
(public_name lamac)
|
||||
(flags
|
||||
(:standard
|
||||
-rectypes
|
||||
;-dsource
|
||||
))
|
||||
(:standard -rectypes))
|
||||
(modules Driver)
|
||||
(libraries liba unix))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue