diff options
author | Camil Staps | 2016-07-05 17:25:10 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-05 17:25:10 +0200 |
commit | ceb0b74bd0b368124679378ebfb2cf316deb2e39 (patch) | |
tree | 7f5c562952bcf0427d838274177123765fe93cf5 /ABC/Program.icl | |
parent | ProgramStore as array for efficiency (diff) |
Added Machine as module level
Diffstat (limited to 'ABC/Program.icl')
-rw-r--r-- | ABC/Program.icl | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/ABC/Program.icl b/ABC/Program.icl deleted file mode 100644 index 28416bb..0000000 --- a/ABC/Program.icl +++ /dev/null @@ -1,27 +0,0 @@ -implementation module ABC.Program - -import StdEnv - -import ABC.Machine -import ABC.Misc - -pc_init :: InstrId -pc_init = 0 - -pc_next :: InstrId -> InstrId -pc_next i = i + 1 - -pc_halt :: InstrId -> InstrId -pc_halt _ = -1 - -pc_end :: InstrId -> Bool -pc_end i = i < 0 - -:: Location = I Instruction -:: ProgramStore :== {Location} - -ps_get :: InstrId ProgramStore -> Instruction -ps_get n p = let (I i) = p.[n] in i - -ps_init :: [Instruction] -> ProgramStore -ps_init is = {I i \\ i <- is} |