diff options
-rw-r--r-- | mu.arc | 8 | ||||
-rw-r--r-- | mu.arc.t | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/mu.arc b/mu.arc index 62a4c8cf..768485b5 100644 --- a/mu.arc +++ b/mu.arc @@ -84,7 +84,8 @@ (= dump-trace* nil) (def trace (label . args) ;? (prn "trace: " dump-trace*) - (when (and dump-trace* (~pos label dump-trace*!blacklist)) + (when (or (is dump-trace* t) + (and dump-trace* (~pos label dump-trace*!blacklist))) (apply prn label ": " args)) (enq (list label (apply tostring:prn args)) traces*)) @@ -118,7 +119,7 @@ (def add-fns (fns) (each (name . body) fns - (= function*.name (convert-braces body)))) + (= function*.name (convert-names:convert-braces body)))) ;; running mu (mac v (operand) ; for value @@ -477,7 +478,8 @@ ; user-defined functions arg (let idx (if arg - arg.0 + (do (assert (is 'literal (ty arg.0))) + (v arg.0)) (do1 caller-arg-idx.routine* (++ caller-arg-idx.routine*))) (trace "arg" arg " " idx " " caller-args.routine*) diff --git a/mu.arc.t b/mu.arc.t index 3d8358ea..5c77c121 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -851,10 +851,11 @@ (reset) (new-trace "new-fn-arg-random-access") +;? (set dump-trace*) (add-fns '((test1 - ((5 integer) <- arg 1) - ((4 integer) <- arg 0) + ((5 integer) <- arg (1 literal)) + ((4 integer) <- arg (0 literal)) ((3 integer) <- add (4 integer) (5 integer)) (reply) ((4 integer) <- copy (34 literal))) ; should never run |