about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-07-26 12:25:40 -0700
committerKartik K. Agaram <vc@akkartik.com>2014-07-26 12:25:40 -0700
commitb16376494824e30cf9149a6b161f2e44204a5bda (patch)
treecf69502b60987994b1c6a41b67c0bffa78d8eac4 /mu.arc
parentbe34290180293f38da1bb51b60181591ccf4fe7e (diff)
downloadmu-b16376494824e30cf9149a6b161f2e44204a5bda.tar.gz
2 - use literal syms instead of type codes
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc17
1 files changed, 8 insertions, 9 deletions
diff --git a/mu.arc b/mu.arc
index c01bcdde..2ade5175 100644
--- a/mu.arc
+++ b/mu.arc
@@ -2,18 +2,17 @@
 ;   code; types; args channel
 (def clear ()
   (= types* (obj
-              integer (obj size 1)
-              type (obj size 1)
-              location (obj size 1)
-              address (obj size 1)
-              boolean (obj size 1)))
+              type (obj size 1  record nil array nil address nil)
+              location (obj size 1  record nil array nil address nil)
+              integer (obj size 1  record nil array nil address nil)
+              boolean (obj size 1  record nil array nil address nil)
+              integer-array (obj array t  elem 'integer)  ; array of ints, size in front
+              integer-address (obj size 1 address t  elem 'integer)  ; pointer to int
+              ))
   (= memory* (table))
   (= function* (table)))
 (clear)
 
-; just a convenience until we get an assembler
-(= type* (obj integer 0 type 1 location 2 address 3 boolean 4))
-
 (def add-fns (fns)
   (each (name . body) fns
     (= function*.name body)))
@@ -90,7 +89,7 @@
                      (memory* fn-args.idx.1)))
               otype
                 (= (memory* oarg.0.1)
-                   (type* (otypes arg.0)))
+                   (otypes arg.0))
               jmp
                 (do (= pc (+ pc arg.0.1))  ; relies on continue still incrementing (bug)
 ;?                     (prn "jumping to " pc)