DebugCore

By Andrew Owen
Released under the MIT license

Notes:

The debug words used in PISC

log-stack ( -- )

Log the current state of the stack

stack-len ( -- stack-len )

Get the length of the stack.

count-go-words ( -- num-go-words )

Get the number of words in the machine that are defined in Go

count-pisc-words ( -- num-pisc-words )

Get the number of words in this machine that are defined in PISC

count-prefix-words ( -- num-prefix-words )

Get the number of words that are defined as Prefixes

show-prefix-words ( -- )

Shows which prefix words are currently loaded

time ( quot -- .. time )

Times how long it takes to execute a quotation, leaving a string atop the stack describing the time
Prints the extant debug trace

clear-debug-trace ( -- )

Clears the debug trace

cpu-pprof ( path quot -- )

Runs the quotation in a PPROF session, saving the data to the file at path

dump-defined-words ( -- )

Dump all of the currently defined words to STDOUT

show-locals ( -- )

prefix: ~ ( name -- quot )