Buildtins, arrays, string (no X86 yet), tests

This commit is contained in:
Dmitry Boulytchev 2018-04-27 01:27:10 +03:00
parent 25eff5c282
commit 39508a0195
10 changed files with 87 additions and 25 deletions

View file

@ -220,7 +220,7 @@ let compile env code =
push_args env ((Push x)::acc) (n-1)
in
let env, pushs = push_args env [] n in
env, pushr @ pushs @ [Call f; Binop ("+", L (n*4), esp)] @ (List.rev popr)
env, pushr @ (List.rev pushs) @ [Call f; Binop ("+", L (n*4), esp)] @ (List.rev popr)
in
(if p then env, code else let y, env = env#allocate in env, code @ [Mov (eax, y)])
in