-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCLASSDEB
58 lines (46 loc) · 1.83 KB
/
CLASSDEB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\ classdbg.f
cr .( Loading Object Debugging support...)
: methods ( object-address -- ) [ classes ]
depth 0=
if ' execute
then
cr >class MFA
begin @ ?dup
while dup cell+ @ unhash
type 14 #tab space 14 ?cr
repeat ;
: ivars ( object-address -- ) [ classes ]
depth 0=
if ' execute
then
cr >class IFA
begin @ ?dup
while dup cell+ @ unhash
type 10 #tab ." (" dup 3 cells+ @ 1 .r ." )"
10 #tab space 20 ?cr
repeat ;
: privates ( class-cfa -- )
context @
swap >class context ! words
context ! ;
classes also hidden also bug also
: GetMethod ( -<method object>- m0cfa )
@word dup count + 1- c@ ':' <> \ allow windows messages too
if anyfind 0= abort" Undefined Method"
execute
else count hash
then ' execute find-method swap to obj-save ;
: msee ( -<method object>- )
GetMethod cr ." :M " dup .m0name 2 spaces
3 cells+ \ step to the PFA
.pfa ; \ decompile the definition
: mdebug ( -<method object>- )
unbug
false to ?dbg-cont \ turn off contuous step
base @ to debug-base
GetMethod 3 cells+ dup ip0 ! ip !
['] trace patch
nesting off ;
: mdbg ( -<method object>- ) \ debug a method now
>in @ mdebug >in ! ;
only forth also definitions