diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-13 09:58:22 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-13 09:58:22 -0700 |
commit | e0b570c087a5c0d365a309261c256c97934ce779 (patch) | |
tree | 6c6a1bccf462cf83c5bba7b5637b3376e20708e1 /mu.arc | |
parent | 7be19db89c27cedae35da0d71fb838cac80f4f04 (diff) | |
download | mu-e0b570c087a5c0d365a309261c256c97934ce779.tar.gz |
899 - undo 898
Diffstat (limited to 'mu.arc')
-rw-r--r-- | mu.arc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mu.arc b/mu.arc index e8e00187..e4f22ce1 100644 --- a/mu.arc +++ b/mu.arc @@ -132,8 +132,7 @@ ; at compile time: mapping names to locations (on-init (= type* (table)) ; name -> type info - (= memory* ($.make-vector 1000000)) ; address -> value -;? (= memory* ($.make-vector 1000000000)) ; address -> value + (= memory* (table)) ; address -> value (make this a vector?) (= function* (table)) ; name -> [instructions] ; transforming mu programs (= location* (table)) ; function -> {name -> index into default-space} @@ -1154,13 +1153,8 @@ (def deref (operand) (assert (pos '(deref) metadata.operand)) (assert address?.operand) - (if (isa v.operand 'int) - (cons `(,(memory* v.operand) ,@typeinfo.operand!elem) - (drop-one '(deref) metadata.operand)) - ; non-numeric address should only happen during freezing - ; no address available, and type can't be an array - (cons `(abcfoo ,@typeinfo.operand!elem) - (drop-one '(deref) metadata.operand)))) + (cons `(,(memory* v.operand) ,@typeinfo.operand!elem) + (drop-one '(deref) metadata.operand))) (def drop-one (f x) (when acons.x ; proper lists only @@ -1373,7 +1367,6 @@ ;? (tr "about to rename args: @op") (when (in op 'get 'get-address) ; special case: map field offset by looking up type table - (prn args.0) (with (basetype (typeof args.0) field (v args.1)) ;? (tr 111 " " args.0 " " basetype) @@ -1652,7 +1645,7 @@ (while change (= change nil) (each (name body) canon.function-table - (prn name) +;? (prn name) ;? 1 (when (no location*.name) (= change t)) (or= location*.name (assign-names-to-location body name))))) |