24
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
951
|
13 |
"{ Package: 'stx:libbasic3' }"
|
|
14 |
|
120
|
15 |
Object subclass:#CallChain
|
236
|
16 |
instanceVariableNames:'receiver selector class isBlock rest'
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'System-Debugging-Support'
|
22
|
20 |
!
|
|
21 |
|
23
|
22 |
!CallChain class methodsFor:'documentation'!
|
|
23 |
|
24
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
88
|
36 |
!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
|
40 |
This is is used as a companion to MessageTally.
|
|
41 |
Instances of it are used to represent a calling chain.
|
261
|
42 |
They are simply holders for some of the contexts values - no
|
|
43 |
intelligence here.
|
88
|
44 |
(MessageTally could have used the contexts themself, but these
|
|
45 |
may create more overhead)
|
236
|
46 |
|
|
47 |
[author:]
|
|
48 |
Claus Gittinger
|
|
49 |
|
|
50 |
[see also:]
|
261
|
51 |
MessageTally ProfileTree
|
236
|
52 |
MessageTracer
|
|
53 |
AbstractTime
|
88
|
54 |
"
|
23
|
55 |
! !
|
|
56 |
|
22
|
57 |
!CallChain methodsFor:'accessing'!
|
|
58 |
|
261
|
59 |
isBlock
|
|
60 |
"return true, if this is a callChain for a block-context"
|
|
61 |
|
88
|
62 |
^ isBlock
|
22
|
63 |
|
261
|
64 |
"Modified: 18.5.1996 / 18:52:05 / cg"
|
22
|
65 |
!
|
|
66 |
|
|
67 |
methodClass
|
261
|
68 |
"return the contexts methods class"
|
|
69 |
|
22
|
70 |
^ class
|
261
|
71 |
|
|
72 |
"Modified: 18.5.1996 / 18:54:04 / cg"
|
22
|
73 |
!
|
|
74 |
|
88
|
75 |
receiver
|
261
|
76 |
"return the contexts receiver"
|
|
77 |
|
88
|
78 |
^ receiver
|
261
|
79 |
|
|
80 |
"Modified: 18.5.1996 / 18:54:12 / cg"
|
88
|
81 |
!
|
|
82 |
|
22
|
83 |
receiver:r selector:s class:cls
|
261
|
84 |
"private tally interface - set receiver, selector and class.
|
|
85 |
the block flag is cleared."
|
|
86 |
|
22
|
87 |
receiver := r.
|
|
88 |
selector := s.
|
|
89 |
class := cls.
|
|
90 |
isBlock := false.
|
261
|
91 |
|
|
92 |
"Modified: 18.5.1996 / 18:54:42 / cg"
|
|
93 |
!
|
|
94 |
|
|
95 |
receiver:r selector:s class:cls isBlock:blk
|
|
96 |
"private tally interface - set receiver, selector, class
|
|
97 |
and the block flag."
|
|
98 |
|
|
99 |
receiver := r.
|
|
100 |
selector := s.
|
|
101 |
class := cls.
|
|
102 |
isBlock := blk.
|
|
103 |
|
|
104 |
"Created: 18.5.1996 / 18:52:34 / cg"
|
|
105 |
"Modified: 18.5.1996 / 18:54:58 / cg"
|
22
|
106 |
!
|
|
107 |
|
88
|
108 |
rest
|
261
|
109 |
"return the chains link"
|
|
110 |
|
88
|
111 |
^ rest
|
261
|
112 |
|
|
113 |
"Modified: 18.5.1996 / 18:55:24 / cg"
|
22
|
114 |
!
|
|
115 |
|
88
|
116 |
rest:r
|
261
|
117 |
"set the chains link"
|
|
118 |
|
88
|
119 |
rest := r.
|
261
|
120 |
|
|
121 |
"Modified: 18.5.1996 / 18:55:19 / cg"
|
22
|
122 |
!
|
|
123 |
|
88
|
124 |
selector
|
261
|
125 |
"return the contexts selector"
|
|
126 |
|
88
|
127 |
^ selector
|
261
|
128 |
|
|
129 |
"Modified: 18.5.1996 / 18:55:11 / cg"
|
22
|
130 |
! !
|
|
131 |
|
|
132 |
!CallChain methodsFor:'comparing'!
|
|
133 |
|
|
134 |
= someInfo
|
261
|
135 |
"return true, if the argument chain is for the same method invocation"
|
|
136 |
|
22
|
137 |
receiver == someInfo receiver ifFalse:[^ false].
|
|
138 |
selector == someInfo selector ifFalse:[^ false].
|
|
139 |
^ class == someInfo methodClass
|
261
|
140 |
|
|
141 |
"Modified: 18.5.1996 / 18:55:47 / cg"
|
951
|
142 |
!
|
|
143 |
|
|
144 |
hash
|
|
145 |
"return an integer useful for hashing on the receiver;
|
|
146 |
redefined since = is redefined here."
|
|
147 |
|
|
148 |
^ (receiver hash bitXor:selector hash) bitXor:class hash
|
22
|
149 |
! !
|
88
|
150 |
|
98
|
151 |
!CallChain class methodsFor:'documentation'!
|
|
152 |
|
|
153 |
version
|
951
|
154 |
^ '$Header: /cvs/stx/stx/libbasic3/CallChain.st,v 1.13 2000-08-19 11:26:10 cg Exp $'
|
98
|
155 |
! !
|