|
@@ -173,9 +173,9 @@ let assemble program =
|
|
|
| FunUse (dec, args, _) ->
|
|
| FunUse (dec, args, _) ->
|
|
|
let init = match (depthof dec, depthof node) with
|
|
let init = match (depthof dec, depthof node) with
|
|
|
| (0, _) -> RtnInit Glob
|
|
| (0, _) -> RtnInit Glob
|
|
|
- | (a, b) when a = b -> RtnInit Current
|
|
|
|
|
- | (a, b) when a = b + 1 -> RtnInit Local
|
|
|
|
|
- | (a, b) -> RtnInit (Rel (b - a))
|
|
|
|
|
|
|
+ | (a, b) when a = b - 1 -> RtnInit Current
|
|
|
|
|
+ | (a, b) when a = b -> RtnInit Local
|
|
|
|
|
+ | (a, b) -> RtnInit (Rel (b - a - 1))
|
|
|
in
|
|
in
|
|
|
let jmp = match dec with
|
|
let jmp = match dec with
|
|
|
| FunDec _ -> RtnJmp (ExternFun (indexof dec))
|
|
| FunDec _ -> RtnJmp (ExternFun (indexof dec))
|