diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-01 20:37:03 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-01 20:37:03 -0800 |
commit | 4e3e8150e25a2fff71583ec967b7339f6689f9f9 (patch) | |
tree | 7136f94b0a66b64fbd4ed22f2b60333813b7822d | |
parent | 475882576c296941722b7b630825046ef79de36c (diff) | |
download | mu-4e3e8150e25a2fff71583ec967b7339f6689f9f9.tar.gz |
857
-rw-r--r-- | mu.arc | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/mu.arc b/mu.arc index c748722f..7029ede8 100644 --- a/mu.arc +++ b/mu.arc @@ -36,29 +36,6 @@ (each f (as cons initialization-fns*) (f))) -; kludge to prevent reloading functions in .mu files for every test -(def reset2 () - (= memory* (table)) - (= Memory-allocated-until 1000) - (awhen curr-trace-file* - (tofile (+ trace-dir* it) - (each (label trace) (as cons traces*) - (pr label ": " trace)))) - (= curr-trace-file* nil) - (= traces* (queue)) - (wipe dump-trace*) - (wipe function*!main) - (wipe location*!main) - (= running-routines* (queue)) - (= sleeping-routines* (table)) - (wipe completed-routines*) - (wipe routine*) - (= abort-routine* (parameter nil)) - (= curr-cycle* 0) - (= scheduling-interval* 500) - (= scheduler-switch-table* nil) - ) - (mac on-init body `(enq (fn () ,@body) initialization-fns*)) @@ -1754,6 +1731,29 @@ ;? (set dump-trace*) ;? 1 (run-more ',name))) +; kludge to prevent reloading functions in .mu files for every test +(def reset2 () + (= memory* (table)) + (= Memory-allocated-until 1000) + (awhen curr-trace-file* + (tofile (+ trace-dir* it) + (each (label trace) (as cons traces*) + (pr label ": " trace)))) + (= curr-trace-file* nil) + (= traces* (queue)) + (wipe dump-trace*) + (wipe function*!main) + (wipe location*!main) + (= running-routines* (queue)) + (= sleeping-routines* (table)) + (wipe completed-routines*) + (wipe routine*) + (= abort-routine* (parameter nil)) + (= curr-cycle* 0) + (= scheduling-interval* 500) + (= scheduler-switch-table* nil) + ) + (def routine-that-ran (f) (find [some [is f _!fn-name] stack._] completed-routines*)) |