diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-10-30 18:45:44 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-10-30 18:45:44 -0700 |
commit | 7946c901c7903596b216472f9cdbe9ae381027c7 (patch) | |
tree | 9e7c8ff0d7bc195ecf3900fe1568176879b95fca | |
parent | 55b73f0ff106c20ccc8496dbe79aba4fb52073f6 (diff) | |
download | mu-7946c901c7903596b216472f9cdbe9ae381027c7.tar.gz |
184
-rw-r--r-- | mu.arc | 3 | ||||
-rw-r--r-- | mu.arc.t | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mu.arc b/mu.arc index 723925c6..cbe6940d 100644 --- a/mu.arc +++ b/mu.arc @@ -673,7 +673,8 @@ (unless (or (in ty.arg 'literal 'offset) (offset v.arg) (~isa v.arg 'sym) - (in v.arg 'nil 'default-scope)) + (in v.arg 'nil 'default-scope) + (pos 'global metadata.arg)) (= (offset v.arg) idx))) ;; literate tangling system for reordering code diff --git a/mu.arc.t b/mu.arc.t index 57e806d9..eb226398 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -1457,4 +1457,15 @@ (~is 23 (memory* (+ before 1)))) (prn "F - default-scope skipped for locations with metadata 'global'"))) +(reset) +(new-trace "convert-names-global") +(if (~iso (convert-names + '(((x integer) <- copy (4 literal)) + ((y integer global) <- copy (2 literal)) + ((default-scope integer) <- add (x integer) (y integer global)))) + '(((1 integer) <- copy (4 literal)) + ((y integer global) <- copy (2 literal)) + ((default-scope integer) <- add (1 integer) (y integer global)))) + (prn "F - convert-names never renames global operands")) + (reset) ; end file with this to persist the trace for the final test |