diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-11-26 22:26:55 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-11-26 22:30:32 -0800 |
commit | 2e818ac82fdcf6474d1cf1a0634aba80af1279e4 (patch) | |
tree | a0837773ad96c4ec8fd38669c34a0890922a42e7 /mu.arc.t | |
parent | 88edf1ba2f617fef366f54ee2383338fdb34ea1a (diff) | |
download | mu-2e818ac82fdcf6474d1cf1a0634aba80af1279e4.tar.gz |
338 - starting to work on string primitives
Diffstat (limited to 'mu.arc.t')
-rw-r--r-- | mu.arc.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t index 3ab70ad8..bad704c8 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -2869,4 +2869,16 @@ '(((2 integer) <- copy (0 literal)))) (prn "F - 'def!' clears all previous clauses")) +;; --- + +(reset) +(new-trace "string-new") +(add-code '((def main [ + ((1 integer) <- new (string literal) (5 literal)) + ]))) +(let before Memory-in-use-until + (run 'main) + (if (~iso Memory-in-use-until (+ before 5 1)) + (prn "F - 'new' allocates arrays of bytes for strings"))) + (reset) ; end file with this to persist the trace for the final test |