home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_translate.ml
diff --git
a/compiler/src/lib/tiger/tiger_translate.ml
b/compiler/src/lib/tiger/tiger_translate.ml
index
483335a
..
9295df9
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_translate.ml
+++ b/
compiler/src/lib/tiger/tiger_translate.ml
@@
-47,13
+47,13
@@
type exp =
type access =
(* must know about static links *)
type access =
(* must know about static links *)
- { level
: Level.t
- ;
frame_
access : Frame.access
+ { level : Level.t
+ ; access : Frame.access
}
let alloc_local ~level ~escapes =
{ level
}
let alloc_local ~level ~escapes =
{ level
- ;
frame_
access = Frame.alloc_local (Level.frame level) ~escapes
+ ; access = Frame.alloc_local (Level.frame level) ~escapes
}
let formals ~level =
}
let formals ~level =
@@
-62,6
+62,9
@@
let formals ~level =
alloc_local ~level ~escapes
)
alloc_local ~level ~escapes
)
+let not_implemented func =
+ failwith (Printf.sprintf "Not implemented: %s.%s" __MODULE__ func)
+
let rec seq = function
(* TODO: Is appending 0 OK? How else can the empty case be handled? *)
| [] -> T.EXP (T.CONST 0)
let rec seq = function
(* TODO: Is appending 0 OK? How else can the empty case be handled? *)
| [] -> T.EXP (T.CONST 0)
@@
-100,3
+103,7
@@
let unCx = function
| Cx g -> g
let dummy__FIXME = Ex (T.CONST 0)
| Cx g -> g
let dummy__FIXME = Ex (T.CONST 0)
+
+let simple_var {level; access} =
+ let pointer = not_implemented "simple_var frame pointer" in
+ Ex (Frame.exp ~access ~pointer)
This page took
0.032104 seconds
and
4
git commands to generate.