aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/profiler.frt
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-08-26 20:31:40 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-08-26 20:31:40 +0200
commitd80736ab6e8e3cad2f1a30c6eaba2d6883dbe967 (patch)
tree15962f3d8542ae182d88ac5913a3c4bfce6f2b03 /amforth-6.5/common/lib/profiler.frt
parent530a312ee523a25e5df475341d201e5bb1296c41 (diff)
Remove AmForth
Diffstat (limited to 'amforth-6.5/common/lib/profiler.frt')
-rw-r--r--amforth-6.5/common/lib/profiler.frt31
1 files changed, 0 insertions, 31 deletions
diff --git a/amforth-6.5/common/lib/profiler.frt b/amforth-6.5/common/lib/profiler.frt
deleted file mode 100644
index d2515e7..0000000
--- a/amforth-6.5/common/lib/profiler.frt
+++ /dev/null
@@ -1,31 +0,0 @@
-\ A profiler counts the number of calls
-\ of any word being defined afterwards.
-\
-\ global state: on and off
-variable profiling?
-: profile:on -1 profiling? ! ;
-: profile:off 0 profiling? ! ;
-
-: profiler profiling? @ if 1 swap +! else drop then ;
-\ re-define colon
-: : :
- here 2 allot postpone literal postpone profiler
-;
-
-\ get the address of the profiling data.
-: xt>prf ( xt -- addr )
- cell+ @i
-;
-
-\ useful stuff
-: .prf xt>prf @ u. ;
-: prf-reset xt>prf 0 swap ! ;
-
-\ usage
-\ : foo bar baz ;
-\ profile:on -- turn on profiling
-\ ' foo .prf -- gets the number of calls to foo
-\ ' foo prf-reset -- resets this number
-\ profile:off -- turn off profiling
-\ wanna profile system words? just re-define them now ;)
-\ e.g. : + + ;