857
This commit is contained in:
parent
475882576c
commit
4e3e8150e2
46
mu.arc
46
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*))
|
||||
|
|
Loading…
Reference in New Issue