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