mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fixed typos in comments
This commit is contained in:
parent
3deda2665d
commit
06fb783c80
1 changed files with 3 additions and 3 deletions
|
|
@ -228,7 +228,7 @@ class env =
|
||||||
method globals = S.elements globals
|
method globals = S.elements globals
|
||||||
end
|
end
|
||||||
|
|
||||||
(* compiles a unit: generates machine code for the stack program and surrounds it
|
(* compiles a unit: generates x86 machine code for the stack program and surrounds it
|
||||||
with function prologue/epilogue
|
with function prologue/epilogue
|
||||||
*)
|
*)
|
||||||
let compile_unit env scode =
|
let compile_unit env scode =
|
||||||
|
|
@ -239,8 +239,8 @@ let compile_unit env scode =
|
||||||
[Mov (ebp, esp); Pop ebp; Binop ("^", eax, eax); Ret]
|
[Mov (ebp, esp); Pop ebp; Binop ("^", eax, eax); Ret]
|
||||||
)
|
)
|
||||||
|
|
||||||
(* Generates an assembler text for a program: first compile the program into
|
(* Generates an assembler text for a program: first compiles the program into
|
||||||
the stack code, then generate x86 assember code, then print the assembler file
|
the stack code, then generates x86 assember code, then prints the assembler file
|
||||||
*)
|
*)
|
||||||
let genasm prog =
|
let genasm prog =
|
||||||
let env, code = compile_unit (new env) (SM.compile prog) in
|
let env, code = compile_unit (new env) (SM.compile prog) in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue