equal
deleted
inserted
replaced
19 ! ! |
19 ! ! |
20 |
20 |
21 !PPCMethod methodsFor:'accessing'! |
21 !PPCMethod methodsFor:'accessing'! |
22 |
22 |
23 body |
23 body |
24 self error: 'Should no longer be used'. |
24 self halt: '???'. |
25 " |
25 " ^ buffer contents" |
26 ^ buffer contents |
|
27 " |
|
28 |
|
29 "Modified: / 17-08-2015 / 11:58:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
30 ! |
26 ! |
31 |
27 |
32 bridge |
28 bridge |
33 ^ PPCBridge on: self methodName. |
29 ^ PPCBridge on: self methodName. |
34 ! |
30 ! |
69 "Created: / 01-06-2015 / 21:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
65 "Created: / 01-06-2015 / 21:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
70 ! |
66 ! |
71 |
67 |
72 methodName |
68 methodName |
73 ^ selector |
69 ^ selector |
74 ! |
|
75 |
|
76 profile |
|
77 self error: 'Should no longer be used'. |
|
78 " |
|
79 ^ profile |
|
80 " |
|
81 |
|
82 "Modified: / 17-08-2015 / 11:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
83 ! |
|
84 |
|
85 profile: aBoolean |
|
86 self error: 'Should no longer be used'. |
|
87 " |
|
88 profile := aBoolean |
|
89 " |
|
90 |
|
91 "Modified: / 17-08-2015 / 11:58:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 ! |
70 ! |
93 |
71 |
94 source |
72 source |
95 ^ source isString ifTrue:[ |
73 ^ source isString ifTrue:[ |
96 source |
74 source |
160 |
138 |
161 outerBlock := source. |
139 outerBlock := source. |
162 innerBlock := PPCCodeBlock new. |
140 innerBlock := PPCCodeBlock new. |
163 innerBlock indentationLevel: outerBlock indentationLevel + 1. |
141 innerBlock indentationLevel: outerBlock indentationLevel + 1. |
164 [ |
142 [ |
165 outerBlock addOnLine:'['. |
143 outerBlock addOnLine: '['. |
166 source := innerBlock. |
144 source := innerBlock. |
167 self codeOnLine: contents. |
145 self codeOnLine: contents. |
168 ] ensure:[ |
146 ] ensure:[ |
169 outerBlock |
147 outerBlock |
170 code: (String streamContents:[:s | innerBlock sourceOn:s]); |
148 codeOnLine: (String streamContents:[:s | innerBlock sourceOn:s]); |
171 add:']'. |
149 add: ']'. |
172 source := outerBlock. |
150 source := outerBlock. |
173 ] |
151 ] |
174 |
152 |
175 "Created: / 01-06-2015 / 22:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
153 "Created: / 01-06-2015 / 22:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
176 "Modified: / 03-06-2015 / 06:11:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
154 "Modified: / 03-06-2015 / 06:11:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
205 ! ! |
183 ! ! |
206 |
184 |
207 !PPCMethod methodsFor:'code generation - variables'! |
185 !PPCMethod methodsFor:'code generation - variables'! |
208 |
186 |
209 addVariable: name |
187 addVariable: name |
210 self error: 'Should no longer be used' |
188 self halt: 'deprecated'. |
211 " |
189 " (variables includes: name) ifTrue:[ |
212 (variables includes: name) ifTrue:[ |
|
213 self error:'Duplicate variable name, must rename'. |
190 self error:'Duplicate variable name, must rename'. |
214 ]. |
191 ]. |
215 variables add: name. |
192 variables add: name. |
216 " |
193 " |
217 |
194 "Modified: / 23-04-2015 / 12:29:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
218 "Modified: / 17-08-2015 / 11:56:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
219 ! |
195 ! |
220 |
196 |
221 allocateReturnVariable |
197 allocateReturnVariable |
222 |
198 |
223 ^ variableForReturn isNil ifTrue:[ |
199 ^ variableForReturn isNil ifTrue:[ |
265 ]. |
241 ]. |
266 variableForReturn := aString |
242 variableForReturn := aString |
267 |
243 |
268 "Created: / 23-04-2015 / 18:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
244 "Created: / 23-04-2015 / 18:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
269 "Modified: / 15-06-2015 / 18:14:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
245 "Modified: / 15-06-2015 / 18:14:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
270 ! |
|
271 |
|
272 variables |
|
273 self error: 'Should no longer be used'. |
|
274 " |
|
275 ^ ' | ', (variables inject: '' into: [ :s :e | s, ' ', e]), ' |' |
|
276 " |
|
277 |
|
278 "Modified: / 17-08-2015 / 11:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
279 ! ! |
246 ! ! |
280 |
247 |
281 !PPCMethod methodsFor:'initialization'! |
248 !PPCMethod methodsFor:'initialization'! |
282 |
249 |
283 initialize |
250 initialize |