2512
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
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 |
"{ Package: 'stx:libcomp' }"
|
|
13 |
|
|
14 |
ParseNode subclass:#BreakpointNode
|
2540
|
15 |
instanceVariableNames:'breakpoint expression lineNumber'
|
2512
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'System-Compiler-Debugging'
|
|
19 |
!
|
|
20 |
|
|
21 |
!BreakpointNode class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
3346
|
35 |
!
|
|
36 |
|
|
37 |
documentation
|
|
38 |
"
|
|
39 |
compiler support for statement breakpoints.
|
|
40 |
"
|
2512
|
41 |
! !
|
|
42 |
|
|
43 |
!BreakpointNode methodsFor:'accessing'!
|
|
44 |
|
|
45 |
breakpoint
|
|
46 |
^ breakpoint
|
|
47 |
!
|
|
48 |
|
|
49 |
breakpoint:something
|
|
50 |
breakpoint := something.
|
|
51 |
!
|
|
52 |
|
|
53 |
expression
|
|
54 |
^ expression
|
|
55 |
!
|
|
56 |
|
|
57 |
expression:something
|
|
58 |
expression := something.
|
2540
|
59 |
!
|
|
60 |
|
|
61 |
lineNumber
|
|
62 |
^ lineNumber
|
|
63 |
!
|
|
64 |
|
3466
|
65 |
lineNumber:lineNumberArg
|
|
66 |
self assert:(lineNumberArg >= 0).
|
|
67 |
lineNumber := lineNumberArg.
|
2512
|
68 |
! !
|
|
69 |
|
|
70 |
!BreakpointNode methodsFor:'code generation'!
|
|
71 |
|
3349
|
72 |
codeForCascadeOn:aStream inBlock:b for:aCompiler
|
|
73 |
|node|
|
|
74 |
|
|
75 |
node := MessageNode
|
|
76 |
receiver: (ConstantNode value: breakpoint)
|
|
77 |
selector: #break.
|
|
78 |
node lineNumber:lineNumber.
|
|
79 |
node codeForSideEffectOn:aStream inBlock:b for:aCompiler.
|
|
80 |
expression notNil ifTrue:[
|
|
81 |
expression codeForCascadeOn:aStream inBlock:b for:aCompiler
|
|
82 |
].
|
|
83 |
!
|
|
84 |
|
3446
|
85 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler
|
|
86 |
|node|
|
|
87 |
|
|
88 |
node := MessageNode
|
|
89 |
receiver: (ConstantNode value: breakpoint)
|
|
90 |
selector: #break.
|
|
91 |
node lineNumber:lineNumber.
|
|
92 |
node codeForSideEffectOn:aStream inBlock:b for:aCompiler.
|
|
93 |
expression notNil ifTrue:[
|
|
94 |
expression codeForSideEffectOn:aStream inBlock:b for:aCompiler
|
|
95 |
].
|
|
96 |
!
|
|
97 |
|
2512
|
98 |
codeOn:aStream inBlock:codeBlock for:aCompiler
|
2540
|
99 |
|node|
|
2512
|
100 |
|
2540
|
101 |
node := MessageNode
|
|
102 |
receiver: (ConstantNode value: breakpoint)
|
|
103 |
selector: #break.
|
|
104 |
node lineNumber:lineNumber.
|
|
105 |
node codeForSideEffectOn:aStream inBlock:codeBlock for:aCompiler.
|
3226
|
106 |
expression notNil ifTrue:[
|
|
107 |
expression codeOn:aStream inBlock:codeBlock for:aCompiler
|
|
108 |
].
|
2512
|
109 |
|
|
110 |
"Created: / 16-06-2011 / 15:17:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
3226
|
111 |
"Modified: / 22-07-2013 / 16:08:34 / cg"
|
2512
|
112 |
! !
|
|
113 |
|
3350
|
114 |
!BreakpointNode methodsFor:'node protocol forwarding'!
|
2544
|
115 |
|
3350
|
116 |
arg1
|
|
117 |
"must forward - otherwise cascades won't work"
|
2544
|
118 |
|
3350
|
119 |
^ expression arg1
|
|
120 |
!
|
2534
|
121 |
|
3350
|
122 |
arguments
|
|
123 |
"must forward - otherwise cascades won't work"
|
2534
|
124 |
|
3350
|
125 |
^ expression arguments
|
3349
|
126 |
!
|
|
127 |
|
|
128 |
isMessage
|
|
129 |
"must forward - otherwise cascades won't work"
|
|
130 |
|
|
131 |
^ expression isMessage
|
|
132 |
!
|
|
133 |
|
|
134 |
receiver
|
|
135 |
"must forward - otherwise cascades won't work"
|
|
136 |
|
|
137 |
^ expression receiver
|
|
138 |
!
|
|
139 |
|
|
140 |
selector
|
|
141 |
"must forward - otherwise cascades won't work"
|
|
142 |
|
|
143 |
^ expression selector
|
2534
|
144 |
! !
|
|
145 |
|
3350
|
146 |
!BreakpointNode methodsFor:'printing'!
|
|
147 |
|
|
148 |
printOn:aStream indent:indent
|
|
149 |
"append a user printed representation of the receiver to aStream.
|
|
150 |
The format is suitable for a human - not meant to be read back."
|
|
151 |
|
|
152 |
expression printOn:aStream indent:indent
|
|
153 |
|
|
154 |
"Created: / 06-07-2011 / 14:31:10 / cg"
|
|
155 |
! !
|
|
156 |
|
|
157 |
!BreakpointNode methodsFor:'testing'!
|
|
158 |
|
|
159 |
isBreakPointNode
|
|
160 |
^ true
|
|
161 |
|
|
162 |
"Created: / 05-07-2011 / 21:13:52 / cg"
|
|
163 |
! !
|
|
164 |
|
2512
|
165 |
!BreakpointNode class methodsFor:'documentation'!
|
|
166 |
|
3350
|
167 |
version
|
3466
|
168 |
^ '$Header: /cvs/stx/stx/libcomp/BreakpointNode.st,v 1.10 2014-06-04 14:38:59 cg Exp $'
|
3350
|
169 |
!
|
|
170 |
|
2512
|
171 |
version_CVS
|
3466
|
172 |
^ '$Header: /cvs/stx/stx/libcomp/BreakpointNode.st,v 1.10 2014-06-04 14:38:59 cg Exp $'
|
2512
|
173 |
!
|
|
174 |
|
|
175 |
version_SVN
|
3226
|
176 |
^ '$ Id $'
|
2512
|
177 |
! !
|
3226
|
178 |
|