resin 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/bin/amberc +10 -350
- data/amber/js/Benchfib.deploy.js +80 -89
- data/amber/js/Benchfib.js +80 -89
- data/amber/js/Canvas.deploy.js +558 -545
- data/amber/js/Canvas.js +563 -545
- data/amber/js/Compiler-AST.deploy.js +431 -243
- data/amber/js/Compiler-AST.js +487 -244
- data/amber/js/Compiler-Core.deploy.js +201 -1045
- data/amber/js/Compiler-Core.js +208 -1207
- data/amber/js/Compiler-Exceptions.deploy.js +37 -18
- data/amber/js/Compiler-Exceptions.js +42 -18
- data/amber/js/Compiler-IR.deploy.js +1071 -774
- data/amber/js/Compiler-IR.js +1194 -848
- data/amber/js/Compiler-Inlining.deploy.js +395 -373
- data/amber/js/Compiler-Inlining.js +395 -373
- data/amber/js/Compiler-Interpreter.deploy.js +1202 -0
- data/amber/js/Compiler-Interpreter.js +1631 -0
- data/amber/js/Compiler-Semantic.deploy.js +695 -600
- data/amber/js/Compiler-Semantic.js +721 -611
- data/amber/js/Compiler-Tests.deploy.js +699 -376
- data/amber/js/Compiler-Tests.js +834 -381
- data/amber/js/Compiler.deploy.js +8563 -1805
- data/amber/js/Compiler.js +11476 -2633
- data/amber/js/Examples.deploy.js +29 -29
- data/amber/js/Examples.js +29 -29
- data/amber/js/IDE.deploy.js +3292 -2649
- data/amber/js/IDE.js +3318 -2710
- data/amber/js/Importer-Exporter.deploy.js +393 -349
- data/amber/js/Importer-Exporter.js +398 -354
- data/amber/js/Kernel-Announcements.deploy.js +53 -44
- data/amber/js/Kernel-Announcements.js +55 -44
- data/amber/js/Kernel-Classes.deploy.js +566 -368
- data/amber/js/Kernel-Classes.js +660 -402
- data/amber/js/Kernel-Collections.deploy.js +1149 -1098
- data/amber/js/Kernel-Collections.js +1183 -1116
- data/amber/js/Kernel-Exceptions.deploy.js +173 -75
- data/amber/js/Kernel-Exceptions.js +215 -77
- data/amber/js/Kernel-Methods.deploy.js +530 -313
- data/amber/js/Kernel-Methods.js +632 -338
- data/amber/js/Kernel-Objects.deploy.js +1734 -1577
- data/amber/js/Kernel-Objects.js +1867 -1654
- data/amber/js/Kernel-Tests.deploy.js +1416 -973
- data/amber/js/Kernel-Tests.js +1495 -981
- data/amber/js/Kernel-Transcript.deploy.js +23 -24
- data/amber/js/Kernel-Transcript.js +25 -26
- data/amber/js/SUnit-Tests.deploy.js +402 -0
- data/amber/js/SUnit-Tests.js +518 -0
- data/amber/js/SUnit.deploy.js +535 -237
- data/amber/js/SUnit.js +634 -246
- data/amber/js/amber.js +90 -53
- data/amber/js/boot.js +441 -255
- data/amber/js/init.js +1 -3
- data/amber/js/lib/CodeMirror/codemirror.css +3 -0
- data/amber/js/lib/CodeMirror/codemirror.js +104 -55
- data/amber/js/lib/peg-0.7.0.min.js +9 -0
- data/amber/js/parser.js +1504 -802
- data/amber/js/parser.pegjs +170 -165
- data/amber/st/Canvas.st +6 -0
- data/amber/st/Compiler-AST.st +54 -3
- data/amber/st/Compiler-Core.st +6 -551
- data/amber/st/Compiler-Exceptions.st +4 -0
- data/amber/st/Compiler-IR.st +205 -87
- data/amber/st/Compiler-Interpreter.st +597 -0
- data/amber/st/Compiler-Semantic.st +46 -21
- data/amber/st/Compiler-Tests.st +254 -7
- data/amber/st/Compiler.st +3172 -1541
- data/amber/st/IDE.st +57 -93
- data/amber/st/Importer-Exporter.st +4 -7
- data/amber/st/Kernel-Announcements.st +8 -0
- data/amber/st/Kernel-Classes.st +149 -40
- data/amber/st/Kernel-Collections.st +43 -32
- data/amber/st/Kernel-Exceptions.st +70 -1
- data/amber/st/Kernel-Methods.st +165 -27
- data/amber/st/Kernel-Objects.st +215 -140
- data/amber/st/Kernel-Tests.st +195 -10
- data/amber/st/Kernel-Transcript.st +1 -3
- data/amber/st/SUnit-Tests.st +186 -0
- data/amber/st/SUnit.st +186 -14
- data/bin/resin +6 -0
- data/lib/resin/cli.rb +19 -0
- metadata +41 -25
- data/amber/js/lib/peg-0.6.2.min.js +0 -2
- data/bin/resin-compile +0 -6
- data/bin/runresin +0 -12
@@ -0,0 +1,1631 @@
|
|
1
|
+
smalltalk.addPackage('Compiler-Interpreter', {});
|
2
|
+
smalltalk.addClass('AIContext', smalltalk.NodeVisitor, ['outerContext', 'pc', 'locals', 'method'], 'Compiler-Interpreter');
|
3
|
+
smalltalk.AIContext.comment="AIContext is like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, it is not read-only.\x0a\x0aWhen debugging, `AIContext` instances are created by copying the current `MethodContext` (thisContext)"
|
4
|
+
smalltalk.addMethod(
|
5
|
+
"_initializeFromMethodContext_",
|
6
|
+
smalltalk.method({
|
7
|
+
selector: "initializeFromMethodContext:",
|
8
|
+
category: 'initialization',
|
9
|
+
fn: function (aMethodContext){
|
10
|
+
var self=this;
|
11
|
+
return smalltalk.withContext(function($ctx1) {
|
12
|
+
_st(self)._pc_(_st(aMethodContext)._pc());
|
13
|
+
_st(self)._receiver_(_st(aMethodContext)._receiver());
|
14
|
+
_st(self)._method_(_st(aMethodContext)._method());
|
15
|
+
$1=_st(aMethodContext)._outerContext();
|
16
|
+
if(($receiver = $1) == nil || $receiver == undefined){
|
17
|
+
$1;
|
18
|
+
} else {
|
19
|
+
_st(self)._outerContext_(_st(_st(self)._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
|
20
|
+
};
|
21
|
+
_st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
|
22
|
+
return smalltalk.withContext(function($ctx2) {
|
23
|
+
}, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
|
24
|
+
return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext}, smalltalk.AIContext)})},
|
25
|
+
args: ["aMethodContext"],
|
26
|
+
source: "initializeFromMethodContext: aMethodContext\x0a\x09self pc: aMethodContext pc.\x0a self receiver: aMethodContext receiver.\x0a self method: aMethodContext method.\x0a aMethodContext outerContext ifNotNil: [\x0a\x09\x09self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].\x0a aMethodContext locals keysAndValuesDo: [ :key :value |\x0a \x09self locals at: key put: value ]\x0a ",
|
27
|
+
messageSends: ["pc:", "pc", "receiver:", "receiver", "method:", "method", "ifNotNil:", "outerContext:", "fromMethodContext:", "outerContext", "class", "keysAndValuesDo:", "at:put:", "locals"],
|
28
|
+
referencedClasses: []
|
29
|
+
}),
|
30
|
+
smalltalk.AIContext);
|
31
|
+
|
32
|
+
smalltalk.addMethod(
|
33
|
+
"_localAt_",
|
34
|
+
smalltalk.method({
|
35
|
+
selector: "localAt:",
|
36
|
+
category: 'accessing',
|
37
|
+
fn: function (aString){
|
38
|
+
var self=this;
|
39
|
+
return smalltalk.withContext(function($ctx1) {
|
40
|
+
$1=_st(_st(self)._locals())._at_ifAbsent_(aString,(function(){
|
41
|
+
return smalltalk.withContext(function($ctx2) {
|
42
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
43
|
+
return $1;
|
44
|
+
}, function($ctx1) {$ctx1.fill(self,"localAt:",{aString:aString}, smalltalk.AIContext)})},
|
45
|
+
args: ["aString"],
|
46
|
+
source: "localAt: aString\x0a\x09^ self locals at: aString ifAbsent: [ nil ]",
|
47
|
+
messageSends: ["at:ifAbsent:", "locals"],
|
48
|
+
referencedClasses: []
|
49
|
+
}),
|
50
|
+
smalltalk.AIContext);
|
51
|
+
|
52
|
+
smalltalk.addMethod(
|
53
|
+
"_localAt_put_",
|
54
|
+
smalltalk.method({
|
55
|
+
selector: "localAt:put:",
|
56
|
+
category: 'accessing',
|
57
|
+
fn: function (aString,anObject){
|
58
|
+
var self=this;
|
59
|
+
return smalltalk.withContext(function($ctx1) {
|
60
|
+
return self}, function($ctx1) {$ctx1.fill(self,"localAt:put:",{aString:aString,anObject:anObject}, smalltalk.AIContext)})},
|
61
|
+
args: ["aString", "anObject"],
|
62
|
+
source: "localAt: aString put: anObject\x0a\x09self locals at: aString put: anObject",
|
63
|
+
messageSends: ["at:put:", "locals"],
|
64
|
+
referencedClasses: []
|
65
|
+
}),
|
66
|
+
smalltalk.AIContext);
|
67
|
+
|
68
|
+
smalltalk.addMethod(
|
69
|
+
"_locals",
|
70
|
+
smalltalk.method({
|
71
|
+
selector: "locals",
|
72
|
+
category: 'accessing',
|
73
|
+
fn: function (){
|
74
|
+
var self=this;
|
75
|
+
return smalltalk.withContext(function($ctx1) {
|
76
|
+
$2=self["@locals"];
|
77
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
78
|
+
self["@locals"]=_st((smalltalk.Dictionary || Dictionary))._new();
|
79
|
+
$1=self["@locals"];
|
80
|
+
} else {
|
81
|
+
$1=$2;
|
82
|
+
};
|
83
|
+
return $1;
|
84
|
+
}, function($ctx1) {$ctx1.fill(self,"locals",{}, smalltalk.AIContext)})},
|
85
|
+
args: [],
|
86
|
+
source: "locals\x0a\x09^ locals ifNil: [ locals := Dictionary new ]",
|
87
|
+
messageSends: ["ifNil:", "new"],
|
88
|
+
referencedClasses: ["Dictionary"]
|
89
|
+
}),
|
90
|
+
smalltalk.AIContext);
|
91
|
+
|
92
|
+
smalltalk.addMethod(
|
93
|
+
"_method",
|
94
|
+
smalltalk.method({
|
95
|
+
selector: "method",
|
96
|
+
category: 'accessing',
|
97
|
+
fn: function (){
|
98
|
+
var self=this;
|
99
|
+
return smalltalk.withContext(function($ctx1) {
|
100
|
+
$1=self["@method"];
|
101
|
+
return $1;
|
102
|
+
}, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.AIContext)})},
|
103
|
+
args: [],
|
104
|
+
source: "method\x0a\x09^ method",
|
105
|
+
messageSends: [],
|
106
|
+
referencedClasses: []
|
107
|
+
}),
|
108
|
+
smalltalk.AIContext);
|
109
|
+
|
110
|
+
smalltalk.addMethod(
|
111
|
+
"_method_",
|
112
|
+
smalltalk.method({
|
113
|
+
selector: "method:",
|
114
|
+
category: 'accessing',
|
115
|
+
fn: function (aCompiledMethod){
|
116
|
+
var self=this;
|
117
|
+
return smalltalk.withContext(function($ctx1) {
|
118
|
+
return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod}, smalltalk.AIContext)})},
|
119
|
+
args: ["aCompiledMethod"],
|
120
|
+
source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
|
121
|
+
messageSends: [],
|
122
|
+
referencedClasses: []
|
123
|
+
}),
|
124
|
+
smalltalk.AIContext);
|
125
|
+
|
126
|
+
smalltalk.addMethod(
|
127
|
+
"_outerContext",
|
128
|
+
smalltalk.method({
|
129
|
+
selector: "outerContext",
|
130
|
+
category: 'accessing',
|
131
|
+
fn: function (){
|
132
|
+
var self=this;
|
133
|
+
return smalltalk.withContext(function($ctx1) {
|
134
|
+
$1=self["@outerContext"];
|
135
|
+
return $1;
|
136
|
+
}, function($ctx1) {$ctx1.fill(self,"outerContext",{}, smalltalk.AIContext)})},
|
137
|
+
args: [],
|
138
|
+
source: "outerContext\x0a\x09^ outerContext",
|
139
|
+
messageSends: [],
|
140
|
+
referencedClasses: []
|
141
|
+
}),
|
142
|
+
smalltalk.AIContext);
|
143
|
+
|
144
|
+
smalltalk.addMethod(
|
145
|
+
"_outerContext_",
|
146
|
+
smalltalk.method({
|
147
|
+
selector: "outerContext:",
|
148
|
+
category: 'accessing',
|
149
|
+
fn: function (anAIContext){
|
150
|
+
var self=this;
|
151
|
+
return smalltalk.withContext(function($ctx1) {
|
152
|
+
return self}, function($ctx1) {$ctx1.fill(self,"outerContext:",{anAIContext:anAIContext}, smalltalk.AIContext)})},
|
153
|
+
args: ["anAIContext"],
|
154
|
+
source: "outerContext: anAIContext\x0a\x09outerContext := anAIContext",
|
155
|
+
messageSends: [],
|
156
|
+
referencedClasses: []
|
157
|
+
}),
|
158
|
+
smalltalk.AIContext);
|
159
|
+
|
160
|
+
smalltalk.addMethod(
|
161
|
+
"_pc",
|
162
|
+
smalltalk.method({
|
163
|
+
selector: "pc",
|
164
|
+
category: 'accessing',
|
165
|
+
fn: function (){
|
166
|
+
var self=this;
|
167
|
+
return smalltalk.withContext(function($ctx1) {
|
168
|
+
$2=self["@pc"];
|
169
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
170
|
+
self["@pc"]=(0);
|
171
|
+
$1=self["@pc"];
|
172
|
+
} else {
|
173
|
+
$1=$2;
|
174
|
+
};
|
175
|
+
return $1;
|
176
|
+
}, function($ctx1) {$ctx1.fill(self,"pc",{}, smalltalk.AIContext)})},
|
177
|
+
args: [],
|
178
|
+
source: "pc\x0a\x09^ pc ifNil: [ pc := 0 ]",
|
179
|
+
messageSends: ["ifNil:"],
|
180
|
+
referencedClasses: []
|
181
|
+
}),
|
182
|
+
smalltalk.AIContext);
|
183
|
+
|
184
|
+
smalltalk.addMethod(
|
185
|
+
"_pc_",
|
186
|
+
smalltalk.method({
|
187
|
+
selector: "pc:",
|
188
|
+
category: 'accessing',
|
189
|
+
fn: function (anInteger){
|
190
|
+
var self=this;
|
191
|
+
return smalltalk.withContext(function($ctx1) {
|
192
|
+
return self}, function($ctx1) {$ctx1.fill(self,"pc:",{anInteger:anInteger}, smalltalk.AIContext)})},
|
193
|
+
args: ["anInteger"],
|
194
|
+
source: "pc: anInteger\x0a\x09pc := anInteger",
|
195
|
+
messageSends: [],
|
196
|
+
referencedClasses: []
|
197
|
+
}),
|
198
|
+
smalltalk.AIContext);
|
199
|
+
|
200
|
+
smalltalk.addMethod(
|
201
|
+
"_receiver",
|
202
|
+
smalltalk.method({
|
203
|
+
selector: "receiver",
|
204
|
+
category: 'accessing',
|
205
|
+
fn: function (){
|
206
|
+
var self=this;
|
207
|
+
return smalltalk.withContext(function($ctx1) {
|
208
|
+
$1=_st(self)._localAt_("self");
|
209
|
+
return $1;
|
210
|
+
}, function($ctx1) {$ctx1.fill(self,"receiver",{}, smalltalk.AIContext)})},
|
211
|
+
args: [],
|
212
|
+
source: "receiver\x0a\x09^ self localAt: 'self'",
|
213
|
+
messageSends: ["localAt:"],
|
214
|
+
referencedClasses: []
|
215
|
+
}),
|
216
|
+
smalltalk.AIContext);
|
217
|
+
|
218
|
+
smalltalk.addMethod(
|
219
|
+
"_receiver_",
|
220
|
+
smalltalk.method({
|
221
|
+
selector: "receiver:",
|
222
|
+
category: 'accessing',
|
223
|
+
fn: function (anObject){
|
224
|
+
var self=this;
|
225
|
+
return smalltalk.withContext(function($ctx1) {
|
226
|
+
return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject}, smalltalk.AIContext)})},
|
227
|
+
args: ["anObject"],
|
228
|
+
source: "receiver: anObject\x0a\x09self localAt: 'self' put: anObject",
|
229
|
+
messageSends: ["localAt:put:"],
|
230
|
+
referencedClasses: []
|
231
|
+
}),
|
232
|
+
smalltalk.AIContext);
|
233
|
+
|
234
|
+
smalltalk.addMethod(
|
235
|
+
"_selector",
|
236
|
+
smalltalk.method({
|
237
|
+
selector: "selector",
|
238
|
+
category: 'accessing',
|
239
|
+
fn: function (){
|
240
|
+
var self=this;
|
241
|
+
return smalltalk.withContext(function($ctx1) {
|
242
|
+
$2=_st(self)._metod();
|
243
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
244
|
+
$1=$2;
|
245
|
+
} else {
|
246
|
+
$1=_st(_st(self)._method())._selector();
|
247
|
+
};
|
248
|
+
return $1;
|
249
|
+
}, function($ctx1) {$ctx1.fill(self,"selector",{}, smalltalk.AIContext)})},
|
250
|
+
args: [],
|
251
|
+
source: "selector\x0a\x09^ self metod\x0a \x09ifNotNil: [ self method selector ]",
|
252
|
+
messageSends: ["ifNotNil:", "selector", "method", "metod"],
|
253
|
+
referencedClasses: []
|
254
|
+
}),
|
255
|
+
smalltalk.AIContext);
|
256
|
+
|
257
|
+
|
258
|
+
smalltalk.addMethod(
|
259
|
+
"_fromMethodContext_",
|
260
|
+
smalltalk.method({
|
261
|
+
selector: "fromMethodContext:",
|
262
|
+
category: 'instance creation',
|
263
|
+
fn: function (aMethodContext){
|
264
|
+
var self=this;
|
265
|
+
return smalltalk.withContext(function($ctx1) {
|
266
|
+
$2=_st(self)._new();
|
267
|
+
_st($2)._initializeFromMethodContext_(aMethodContext);
|
268
|
+
$3=_st($2)._yourself();
|
269
|
+
$1=$3;
|
270
|
+
return $1;
|
271
|
+
}, function($ctx1) {$ctx1.fill(self,"fromMethodContext:",{aMethodContext:aMethodContext}, smalltalk.AIContext.klass)})},
|
272
|
+
args: ["aMethodContext"],
|
273
|
+
source: "fromMethodContext: aMethodContext\x0a\x09^ self new\x0a \x09initializeFromMethodContext: aMethodContext;\x0a yourself",
|
274
|
+
messageSends: ["initializeFromMethodContext:", "new", "yourself"],
|
275
|
+
referencedClasses: []
|
276
|
+
}),
|
277
|
+
smalltalk.AIContext.klass);
|
278
|
+
|
279
|
+
|
280
|
+
smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
|
281
|
+
smalltalk.ASTDebugger.comment="ASTDebugger is a debugger to Amber.\x0aIt uses an AST interpreter to step through the code.\x0a\x0aASTDebugger instances are created from a `MethodContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0aUse the methods of the 'stepping' protocol to do stepping."
|
282
|
+
smalltalk.addMethod(
|
283
|
+
"_buildAST",
|
284
|
+
smalltalk.method({
|
285
|
+
selector: "buildAST",
|
286
|
+
category: 'initialization',
|
287
|
+
fn: function (){
|
288
|
+
var self=this;
|
289
|
+
var ast;
|
290
|
+
return smalltalk.withContext(function($ctx1) {
|
291
|
+
ast=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._parse_(_st(_st(self)._method())._source());
|
292
|
+
_st(_st((smalltalk.SemanticAnalyzer || SemanticAnalyzer))._on_(_st(_st(_st(self)._context())._receiver())._class()))._visit_(ast);
|
293
|
+
$1=ast;
|
294
|
+
return $1;
|
295
|
+
}, function($ctx1) {$ctx1.fill(self,"buildAST",{ast:ast}, smalltalk.ASTDebugger)})},
|
296
|
+
args: [],
|
297
|
+
source: "buildAST\x0a\x09\x22Build the AST tree from the method source code.\x0a The AST is annotated with a SemanticAnalyzer, \x0a to know the semantics and bindings of each node needed for later debugging\x22\x0a \x0a | ast |\x0a \x0a ast := Smalltalk current parse: self method source.\x0a (SemanticAnalyzer on: self context receiver class)\x0a \x09visit: ast. \x0a \x0a ^ ast",
|
298
|
+
messageSends: ["parse:", "source", "method", "current", "visit:", "on:", "class", "receiver", "context"],
|
299
|
+
referencedClasses: ["Smalltalk", "SemanticAnalyzer"]
|
300
|
+
}),
|
301
|
+
smalltalk.ASTDebugger);
|
302
|
+
|
303
|
+
smalltalk.addMethod(
|
304
|
+
"_context",
|
305
|
+
smalltalk.method({
|
306
|
+
selector: "context",
|
307
|
+
category: 'accessing',
|
308
|
+
fn: function (){
|
309
|
+
var self=this;
|
310
|
+
return smalltalk.withContext(function($ctx1) {
|
311
|
+
$1=self["@context"];
|
312
|
+
return $1;
|
313
|
+
}, function($ctx1) {$ctx1.fill(self,"context",{}, smalltalk.ASTDebugger)})},
|
314
|
+
args: [],
|
315
|
+
source: "context\x0a\x09^ context",
|
316
|
+
messageSends: [],
|
317
|
+
referencedClasses: []
|
318
|
+
}),
|
319
|
+
smalltalk.ASTDebugger);
|
320
|
+
|
321
|
+
smalltalk.addMethod(
|
322
|
+
"_context_",
|
323
|
+
smalltalk.method({
|
324
|
+
selector: "context:",
|
325
|
+
category: 'accessing',
|
326
|
+
fn: function (aContext){
|
327
|
+
var self=this;
|
328
|
+
return smalltalk.withContext(function($ctx1) {
|
329
|
+
return self}, function($ctx1) {$ctx1.fill(self,"context:",{aContext:aContext}, smalltalk.ASTDebugger)})},
|
330
|
+
args: ["aContext"],
|
331
|
+
source: "context: aContext\x0a\x09context := AIContext new.",
|
332
|
+
messageSends: ["new"],
|
333
|
+
referencedClasses: ["AIContext"]
|
334
|
+
}),
|
335
|
+
smalltalk.ASTDebugger);
|
336
|
+
|
337
|
+
smalltalk.addMethod(
|
338
|
+
"_defaultInterpreterClass",
|
339
|
+
smalltalk.method({
|
340
|
+
selector: "defaultInterpreterClass",
|
341
|
+
category: 'defaults',
|
342
|
+
fn: function (){
|
343
|
+
var self=this;
|
344
|
+
return smalltalk.withContext(function($ctx1) {
|
345
|
+
$1=(smalltalk.ASTSteppingInterpreter || ASTSteppingInterpreter);
|
346
|
+
return $1;
|
347
|
+
}, function($ctx1) {$ctx1.fill(self,"defaultInterpreterClass",{}, smalltalk.ASTDebugger)})},
|
348
|
+
args: [],
|
349
|
+
source: "defaultInterpreterClass\x0a\x09^ ASTSteppingInterpreter",
|
350
|
+
messageSends: [],
|
351
|
+
referencedClasses: ["ASTSteppingInterpreter"]
|
352
|
+
}),
|
353
|
+
smalltalk.ASTDebugger);
|
354
|
+
|
355
|
+
smalltalk.addMethod(
|
356
|
+
"_initializeInterpreter",
|
357
|
+
smalltalk.method({
|
358
|
+
selector: "initializeInterpreter",
|
359
|
+
category: 'initialization',
|
360
|
+
fn: function (){
|
361
|
+
var self=this;
|
362
|
+
return smalltalk.withContext(function($ctx1) {
|
363
|
+
return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{}, smalltalk.ASTDebugger)})},
|
364
|
+
args: [],
|
365
|
+
source: "initializeInterpreter\x0a\x09self interpreter interpret: self buildAST nodes first",
|
366
|
+
messageSends: ["interpret:", "first", "nodes", "buildAST", "interpreter"],
|
367
|
+
referencedClasses: []
|
368
|
+
}),
|
369
|
+
smalltalk.ASTDebugger);
|
370
|
+
|
371
|
+
smalltalk.addMethod(
|
372
|
+
"_initializeWithContext_",
|
373
|
+
smalltalk.method({
|
374
|
+
selector: "initializeWithContext:",
|
375
|
+
category: 'initialization',
|
376
|
+
fn: function (aMethodContext){
|
377
|
+
var self=this;
|
378
|
+
return smalltalk.withContext(function($ctx1) {
|
379
|
+
_st(self)._initializeInterpreter();
|
380
|
+
return self}, function($ctx1) {$ctx1.fill(self,"initializeWithContext:",{aMethodContext:aMethodContext}, smalltalk.ASTDebugger)})},
|
381
|
+
args: ["aMethodContext"],
|
382
|
+
source: "initializeWithContext: aMethodContext\x0a\x09\x22TODO: do we need to handle block contexts?\x22\x0a \x0a self context: (AIContext fromMethodContext: aMethodContext).\x0a self initializeInterpreter",
|
383
|
+
messageSends: ["context:", "fromMethodContext:", "initializeInterpreter"],
|
384
|
+
referencedClasses: ["AIContext"]
|
385
|
+
}),
|
386
|
+
smalltalk.ASTDebugger);
|
387
|
+
|
388
|
+
smalltalk.addMethod(
|
389
|
+
"_interpreter",
|
390
|
+
smalltalk.method({
|
391
|
+
selector: "interpreter",
|
392
|
+
category: 'accessing',
|
393
|
+
fn: function (){
|
394
|
+
var self=this;
|
395
|
+
return smalltalk.withContext(function($ctx1) {
|
396
|
+
$2=self["@interpreter"];
|
397
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
398
|
+
self["@interpreter"]=_st(_st(self)._defaultInterpreterClass())._new();
|
399
|
+
$1=self["@interpreter"];
|
400
|
+
} else {
|
401
|
+
$1=$2;
|
402
|
+
};
|
403
|
+
return $1;
|
404
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter",{}, smalltalk.ASTDebugger)})},
|
405
|
+
args: [],
|
406
|
+
source: "interpreter\x0a\x09^ interpreter ifNil: [ interpreter := self defaultInterpreterClass new ]",
|
407
|
+
messageSends: ["ifNil:", "new", "defaultInterpreterClass"],
|
408
|
+
referencedClasses: []
|
409
|
+
}),
|
410
|
+
smalltalk.ASTDebugger);
|
411
|
+
|
412
|
+
smalltalk.addMethod(
|
413
|
+
"_interpreter_",
|
414
|
+
smalltalk.method({
|
415
|
+
selector: "interpreter:",
|
416
|
+
category: 'accessing',
|
417
|
+
fn: function (anInterpreter){
|
418
|
+
var self=this;
|
419
|
+
return smalltalk.withContext(function($ctx1) {
|
420
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpreter:",{anInterpreter:anInterpreter}, smalltalk.ASTDebugger)})},
|
421
|
+
args: ["anInterpreter"],
|
422
|
+
source: "interpreter: anInterpreter\x0a\x09interpreter := anInterpreter",
|
423
|
+
messageSends: [],
|
424
|
+
referencedClasses: []
|
425
|
+
}),
|
426
|
+
smalltalk.ASTDebugger);
|
427
|
+
|
428
|
+
smalltalk.addMethod(
|
429
|
+
"_method",
|
430
|
+
smalltalk.method({
|
431
|
+
selector: "method",
|
432
|
+
category: 'accessing',
|
433
|
+
fn: function (){
|
434
|
+
var self=this;
|
435
|
+
return smalltalk.withContext(function($ctx1) {
|
436
|
+
$1=_st(_st(self)._context())._method();
|
437
|
+
return $1;
|
438
|
+
}, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.ASTDebugger)})},
|
439
|
+
args: [],
|
440
|
+
source: "method\x0a\x09^ self context method",
|
441
|
+
messageSends: ["method", "context"],
|
442
|
+
referencedClasses: []
|
443
|
+
}),
|
444
|
+
smalltalk.ASTDebugger);
|
445
|
+
|
446
|
+
smalltalk.addMethod(
|
447
|
+
"_restart",
|
448
|
+
smalltalk.method({
|
449
|
+
selector: "restart",
|
450
|
+
category: 'stepping',
|
451
|
+
fn: function (){
|
452
|
+
var self=this;
|
453
|
+
return smalltalk.withContext(function($ctx1) {
|
454
|
+
return self}, function($ctx1) {$ctx1.fill(self,"restart",{}, smalltalk.ASTDebugger)})},
|
455
|
+
args: [],
|
456
|
+
source: "restart\x0a\x09self shouldBeImplemented",
|
457
|
+
messageSends: ["shouldBeImplemented"],
|
458
|
+
referencedClasses: []
|
459
|
+
}),
|
460
|
+
smalltalk.ASTDebugger);
|
461
|
+
|
462
|
+
smalltalk.addMethod(
|
463
|
+
"_resume",
|
464
|
+
smalltalk.method({
|
465
|
+
selector: "resume",
|
466
|
+
category: 'stepping',
|
467
|
+
fn: function (){
|
468
|
+
var self=this;
|
469
|
+
return smalltalk.withContext(function($ctx1) {
|
470
|
+
return self}, function($ctx1) {$ctx1.fill(self,"resume",{}, smalltalk.ASTDebugger)})},
|
471
|
+
args: [],
|
472
|
+
source: "resume\x0a\x09self shouldBeImplemented",
|
473
|
+
messageSends: ["shouldBeImplemented"],
|
474
|
+
referencedClasses: []
|
475
|
+
}),
|
476
|
+
smalltalk.ASTDebugger);
|
477
|
+
|
478
|
+
smalltalk.addMethod(
|
479
|
+
"_step",
|
480
|
+
smalltalk.method({
|
481
|
+
selector: "step",
|
482
|
+
category: 'stepping',
|
483
|
+
fn: function (){
|
484
|
+
var self=this;
|
485
|
+
return smalltalk.withContext(function($ctx1) {
|
486
|
+
return smalltalk.withContext(function($ctx2) {
|
487
|
+
return smalltalk.withContext(function($ctx3) {
|
488
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._or_((function(){
|
489
|
+
return smalltalk.withContext(function($ctx3) {
|
490
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
491
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
|
492
|
+
return smalltalk.withContext(function($ctx2) {
|
493
|
+
return _st(self)._step();
|
494
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
495
|
+
return self}, function($ctx1) {$ctx1.fill(self,"step",{}, smalltalk.ASTDebugger)})},
|
496
|
+
args: [],
|
497
|
+
source: "step\x0a\x09\x22The ASTSteppingInterpreter stops at each node interpretation. \x0a One step will interpret nodes until:\x0a - we get at the end\x0a - the next node is a stepping node (send, assignment, etc.)\x22\x0a \x0a\x09[ (self interpreter nextNode notNil and: [ self interpreter nextNode stopOnStepping ])\x0a\x09\x09or: [ self interpreter atEnd not ] ] \x0a \x09\x09\x09whileFalse: [\x0a\x09\x09\x09\x09self interpreter step. \x0a self step ]",
|
498
|
+
messageSends: ["whileFalse:", "step", "interpreter", "or:", "not", "atEnd", "and:", "stopOnStepping", "nextNode", "notNil"],
|
499
|
+
referencedClasses: []
|
500
|
+
}),
|
501
|
+
smalltalk.ASTDebugger);
|
502
|
+
|
503
|
+
smalltalk.addMethod(
|
504
|
+
"_stepInto",
|
505
|
+
smalltalk.method({
|
506
|
+
selector: "stepInto",
|
507
|
+
category: 'stepping',
|
508
|
+
fn: function (){
|
509
|
+
var self=this;
|
510
|
+
return smalltalk.withContext(function($ctx1) {
|
511
|
+
return self}, function($ctx1) {$ctx1.fill(self,"stepInto",{}, smalltalk.ASTDebugger)})},
|
512
|
+
args: [],
|
513
|
+
source: "stepInto\x0a\x09self shouldBeImplemented",
|
514
|
+
messageSends: ["shouldBeImplemented"],
|
515
|
+
referencedClasses: []
|
516
|
+
}),
|
517
|
+
smalltalk.ASTDebugger);
|
518
|
+
|
519
|
+
smalltalk.addMethod(
|
520
|
+
"_stepOver",
|
521
|
+
smalltalk.method({
|
522
|
+
selector: "stepOver",
|
523
|
+
category: 'stepping',
|
524
|
+
fn: function (){
|
525
|
+
var self=this;
|
526
|
+
return smalltalk.withContext(function($ctx1) {
|
527
|
+
return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{}, smalltalk.ASTDebugger)})},
|
528
|
+
args: [],
|
529
|
+
source: "stepOver\x0a\x09self step",
|
530
|
+
messageSends: ["step"],
|
531
|
+
referencedClasses: []
|
532
|
+
}),
|
533
|
+
smalltalk.ASTDebugger);
|
534
|
+
|
535
|
+
|
536
|
+
smalltalk.addMethod(
|
537
|
+
"_context_",
|
538
|
+
smalltalk.method({
|
539
|
+
selector: "context:",
|
540
|
+
category: 'instance creation',
|
541
|
+
fn: function (aMethodContext){
|
542
|
+
var self=this;
|
543
|
+
return smalltalk.withContext(function($ctx1) {
|
544
|
+
$2=_st(self)._new();
|
545
|
+
_st($2)._initializeWithContext_(aMethodContext);
|
546
|
+
$3=_st($2)._yourself();
|
547
|
+
$1=$3;
|
548
|
+
return $1;
|
549
|
+
}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext}, smalltalk.ASTDebugger.klass)})},
|
550
|
+
args: ["aMethodContext"],
|
551
|
+
source: "context: aMethodContext\x0a\x09^ self new\x0a \x09initializeWithContext: aMethodContext;\x0a yourself",
|
552
|
+
messageSends: ["initializeWithContext:", "new", "yourself"],
|
553
|
+
referencedClasses: []
|
554
|
+
}),
|
555
|
+
smalltalk.ASTDebugger.klass);
|
556
|
+
|
557
|
+
|
558
|
+
smalltalk.addClass('ASTInterpreter', smalltalk.Object, ['currentNode', 'context', 'shouldReturn', 'result'], 'Compiler-Interpreter');
|
559
|
+
smalltalk.ASTInterpreter.comment="ASTIntepreter is like a `NodeVisitor`, interpreting nodes one after each other.\x0aIt is built using Continuation Passing Style for stepping purposes.\x0a\x0aUsage example:\x0a\x0a | ast interpreter |\x0a ast := Smalltalk current parse: 'foo 1+2+4'.\x0a (SemanticAnalyzer on: Object) visit: ast.\x0a\x0a ASTInterpreter new\x0a interpret: ast nodes first;\x0a result \x22Answers 7\x22"
|
560
|
+
smalltalk.addMethod(
|
561
|
+
"_assign_to_",
|
562
|
+
smalltalk.method({
|
563
|
+
selector: "assign:to:",
|
564
|
+
category: 'private',
|
565
|
+
fn: function (aNode,anObject){
|
566
|
+
var self=this;
|
567
|
+
return smalltalk.withContext(function($ctx1) {
|
568
|
+
$2=_st(_st(aNode)._binding())._isInstanceVar();
|
569
|
+
if(smalltalk.assert($2)){
|
570
|
+
$1=_st(_st(_st(self)._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
|
571
|
+
} else {
|
572
|
+
$1=_st(_st(self)._context())._localAt_put_(_st(aNode)._value(),anObject);
|
573
|
+
};
|
574
|
+
return $1;
|
575
|
+
}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject}, smalltalk.ASTInterpreter)})},
|
576
|
+
args: ["aNode", "anObject"],
|
577
|
+
source: "assign: aNode to: anObject\x0a\x09^ aNode binding isInstanceVar \x0a \x09ifTrue: [ self context receiver instVarAt: aNode value put: anObject ]\x0a \x09ifFalse: [ self context localAt: aNode value put: anObject ]",
|
578
|
+
messageSends: ["ifTrue:ifFalse:", "instVarAt:put:", "value", "receiver", "context", "localAt:put:", "isInstanceVar", "binding"],
|
579
|
+
referencedClasses: []
|
580
|
+
}),
|
581
|
+
smalltalk.ASTInterpreter);
|
582
|
+
|
583
|
+
smalltalk.addMethod(
|
584
|
+
"_context",
|
585
|
+
smalltalk.method({
|
586
|
+
selector: "context",
|
587
|
+
category: 'accessing',
|
588
|
+
fn: function (){
|
589
|
+
var self=this;
|
590
|
+
return smalltalk.withContext(function($ctx1) {
|
591
|
+
$2=self["@context"];
|
592
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
593
|
+
self["@context"]=_st((smalltalk.AIContext || AIContext))._new();
|
594
|
+
$1=self["@context"];
|
595
|
+
} else {
|
596
|
+
$1=$2;
|
597
|
+
};
|
598
|
+
return $1;
|
599
|
+
}, function($ctx1) {$ctx1.fill(self,"context",{}, smalltalk.ASTInterpreter)})},
|
600
|
+
args: [],
|
601
|
+
source: "context\x0a\x09^ context ifNil: [ context := AIContext new ]",
|
602
|
+
messageSends: ["ifNil:", "new"],
|
603
|
+
referencedClasses: ["AIContext"]
|
604
|
+
}),
|
605
|
+
smalltalk.ASTInterpreter);
|
606
|
+
|
607
|
+
smalltalk.addMethod(
|
608
|
+
"_context_",
|
609
|
+
smalltalk.method({
|
610
|
+
selector: "context:",
|
611
|
+
category: 'accessing',
|
612
|
+
fn: function (anAIContext){
|
613
|
+
var self=this;
|
614
|
+
return smalltalk.withContext(function($ctx1) {
|
615
|
+
return self}, function($ctx1) {$ctx1.fill(self,"context:",{anAIContext:anAIContext}, smalltalk.ASTInterpreter)})},
|
616
|
+
args: ["anAIContext"],
|
617
|
+
source: "context: anAIContext\x0a\x09context := anAIContext",
|
618
|
+
messageSends: [],
|
619
|
+
referencedClasses: []
|
620
|
+
}),
|
621
|
+
smalltalk.ASTInterpreter);
|
622
|
+
|
623
|
+
smalltalk.addMethod(
|
624
|
+
"_continue_value_",
|
625
|
+
smalltalk.method({
|
626
|
+
selector: "continue:value:",
|
627
|
+
category: 'private',
|
628
|
+
fn: function (aBlock,anObject){
|
629
|
+
var self=this;
|
630
|
+
return smalltalk.withContext(function($ctx1) {
|
631
|
+
_st(aBlock)._value_(anObject);
|
632
|
+
return self}, function($ctx1) {$ctx1.fill(self,"continue:value:",{aBlock:aBlock,anObject:anObject}, smalltalk.ASTInterpreter)})},
|
633
|
+
args: ["aBlock", "anObject"],
|
634
|
+
source: "continue: aBlock value: anObject\x0a\x09result := anObject.\x0a aBlock value: anObject",
|
635
|
+
messageSends: ["value:"],
|
636
|
+
referencedClasses: []
|
637
|
+
}),
|
638
|
+
smalltalk.ASTInterpreter);
|
639
|
+
|
640
|
+
smalltalk.addMethod(
|
641
|
+
"_currentNode",
|
642
|
+
smalltalk.method({
|
643
|
+
selector: "currentNode",
|
644
|
+
category: 'accessing',
|
645
|
+
fn: function (){
|
646
|
+
var self=this;
|
647
|
+
return smalltalk.withContext(function($ctx1) {
|
648
|
+
$1=self["@currentNode"];
|
649
|
+
return $1;
|
650
|
+
}, function($ctx1) {$ctx1.fill(self,"currentNode",{}, smalltalk.ASTInterpreter)})},
|
651
|
+
args: [],
|
652
|
+
source: "currentNode\x0a\x09^ currentNode",
|
653
|
+
messageSends: [],
|
654
|
+
referencedClasses: []
|
655
|
+
}),
|
656
|
+
smalltalk.ASTInterpreter);
|
657
|
+
|
658
|
+
smalltalk.addMethod(
|
659
|
+
"_eval_",
|
660
|
+
smalltalk.method({
|
661
|
+
selector: "eval:",
|
662
|
+
category: 'private',
|
663
|
+
fn: function (aString){
|
664
|
+
var self=this;
|
665
|
+
var source,function_;
|
666
|
+
return smalltalk.withContext(function($ctx1) {
|
667
|
+
source=_st((smalltalk.String || String))._streamContents_((function(str){
|
668
|
+
return smalltalk.withContext(function($ctx2) {
|
669
|
+
_st(_st(_st(_st(self)._context())._locals())._keys())._do_separatedBy_((function(each){
|
670
|
+
return smalltalk.withContext(function($ctx3) {
|
671
|
+
}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
|
672
|
+
return smalltalk.withContext(function($ctx3) {
|
673
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
674
|
+
$1=str;
|
675
|
+
_st($1)._nextPutAll_("){ return (function() {");
|
676
|
+
_st($1)._nextPutAll_(aString);
|
677
|
+
$2=_st($1)._nextPutAll_("})() })");
|
678
|
+
return $2;
|
679
|
+
}, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1)})}));
|
680
|
+
function_=_st(_st((smalltalk.Compiler || Compiler))._new())._eval_(source);
|
681
|
+
$3=_st(function_)._valueWithPossibleArguments_(_st(_st(_st(self)._context())._locals())._values());
|
682
|
+
return $3;
|
683
|
+
}, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_}, smalltalk.ASTInterpreter)})},
|
684
|
+
args: ["aString"],
|
685
|
+
source: "eval: aString\x0a\x09\x22Evaluate aString as JS source inside an JS function. \x0a aString is not sandboxed.\x22\x0a \x0a | source function |\x0a \x0a source := String streamContents: [ :str |\x0a \x09str nextPutAll: '(function('.\x0a self context locals keys \x0a \x09do: [ :each | str nextPutAll: each ]\x0a \x09separatedBy: [ str nextPutAll: ',' ].\x0a str \x0a \x09nextPutAll: '){ return (function() {';\x0a \x09nextPutAll: aString;\x0a nextPutAll: '})() })' ].\x0a \x0a\x09function := Compiler new eval: source.\x0a \x0a\x09^ function valueWithPossibleArguments: self context locals values",
|
686
|
+
messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"],
|
687
|
+
referencedClasses: ["String", "Compiler"]
|
688
|
+
}),
|
689
|
+
smalltalk.ASTInterpreter);
|
690
|
+
|
691
|
+
smalltalk.addMethod(
|
692
|
+
"_initialize",
|
693
|
+
smalltalk.method({
|
694
|
+
selector: "initialize",
|
695
|
+
category: 'initialization',
|
696
|
+
fn: function (){
|
697
|
+
var self=this;
|
698
|
+
return smalltalk.withContext(function($ctx1) {
|
699
|
+
self["@shouldReturn"]=false;
|
700
|
+
return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ASTInterpreter)})},
|
701
|
+
args: [],
|
702
|
+
source: "initialize\x0a\x09super initialize.\x0a shouldReturn := false",
|
703
|
+
messageSends: ["initialize"],
|
704
|
+
referencedClasses: []
|
705
|
+
}),
|
706
|
+
smalltalk.ASTInterpreter);
|
707
|
+
|
708
|
+
smalltalk.addMethod(
|
709
|
+
"_interpret_",
|
710
|
+
smalltalk.method({
|
711
|
+
selector: "interpret:",
|
712
|
+
category: 'interpreting',
|
713
|
+
fn: function (aNode){
|
714
|
+
var self=this;
|
715
|
+
return smalltalk.withContext(function($ctx1) {
|
716
|
+
_st(self)._interpret_continue_(aNode,(function(value){
|
717
|
+
return smalltalk.withContext(function($ctx2) {
|
718
|
+
return self["@result"];
|
719
|
+
}, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
|
720
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpret:",{aNode:aNode}, smalltalk.ASTInterpreter)})},
|
721
|
+
args: ["aNode"],
|
722
|
+
source: "interpret: aNode\x0a\x09shouldReturn := false.\x0a self interpret: aNode continue: [ :value |\x0a \x09result := value ]",
|
723
|
+
messageSends: ["interpret:continue:"],
|
724
|
+
referencedClasses: []
|
725
|
+
}),
|
726
|
+
smalltalk.ASTInterpreter);
|
727
|
+
|
728
|
+
smalltalk.addMethod(
|
729
|
+
"_interpret_continue_",
|
730
|
+
smalltalk.method({
|
731
|
+
selector: "interpret:continue:",
|
732
|
+
category: 'interpreting',
|
733
|
+
fn: function (aNode,aBlock){
|
734
|
+
var self=this;
|
735
|
+
return smalltalk.withContext(function($ctx1) {
|
736
|
+
$1=self["@shouldReturn"];
|
737
|
+
if(smalltalk.assert($1)){
|
738
|
+
$2=self;
|
739
|
+
return $2;
|
740
|
+
};
|
741
|
+
$3=_st(aNode)._isNode();
|
742
|
+
if(smalltalk.assert($3)){
|
743
|
+
self["@currentNode"]=aNode;
|
744
|
+
self["@currentNode"];
|
745
|
+
_st(self)._interpretNode_continue_(aNode,(function(value){
|
746
|
+
return smalltalk.withContext(function($ctx2) {
|
747
|
+
}, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
|
748
|
+
} else {
|
749
|
+
_st(self)._continue_value_(aBlock,aNode);
|
750
|
+
};
|
751
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
752
|
+
args: ["aNode", "aBlock"],
|
753
|
+
source: "interpret: aNode continue: aBlock\x0a\x09shouldReturn ifTrue: [ ^ self ].\x0a\x0a\x09aNode isNode \x0a \x09ifTrue: [ \x09\x0a \x09currentNode := aNode.\x0a self interpretNode: aNode continue: [ :value |\x0a \x09\x09\x09\x09self continue: aBlock value: value ] ]\x0a ifFalse: [ self continue: aBlock value: aNode ]",
|
754
|
+
messageSends: ["ifTrue:", "ifTrue:ifFalse:", "interpretNode:continue:", "continue:value:", "isNode"],
|
755
|
+
referencedClasses: []
|
756
|
+
}),
|
757
|
+
smalltalk.ASTInterpreter);
|
758
|
+
|
759
|
+
smalltalk.addMethod(
|
760
|
+
"_interpretAll_continue_",
|
761
|
+
smalltalk.method({
|
762
|
+
selector: "interpretAll:continue:",
|
763
|
+
category: 'private',
|
764
|
+
fn: function (aCollection,aBlock){
|
765
|
+
var self=this;
|
766
|
+
return smalltalk.withContext(function($ctx1) {
|
767
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:",{aCollection:aCollection,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
768
|
+
args: ["aCollection", "aBlock"],
|
769
|
+
source: "interpretAll: aCollection continue: aBlock\x0a\x09self \x0a \x09interpretAll: aCollection \x0a continue: aBlock \x0a result: OrderedCollection new",
|
770
|
+
messageSends: ["interpretAll:continue:result:", "new"],
|
771
|
+
referencedClasses: ["OrderedCollection"]
|
772
|
+
}),
|
773
|
+
smalltalk.ASTInterpreter);
|
774
|
+
|
775
|
+
smalltalk.addMethod(
|
776
|
+
"_interpretAll_continue_result_",
|
777
|
+
smalltalk.method({
|
778
|
+
selector: "interpretAll:continue:result:",
|
779
|
+
category: 'private',
|
780
|
+
fn: function (nodes,aBlock,aCollection){
|
781
|
+
var self=this;
|
782
|
+
return smalltalk.withContext(function($ctx1) {
|
783
|
+
$1=_st(nodes)._isEmpty();
|
784
|
+
if(smalltalk.assert($1)){
|
785
|
+
_st(self)._continue_value_(aBlock,aCollection);
|
786
|
+
} else {
|
787
|
+
_st(self)._interpret_continue_(_st(nodes)._first(),(function(value){
|
788
|
+
return smalltalk.withContext(function($ctx2) {
|
789
|
+
}, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
|
790
|
+
};
|
791
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretAll:continue:result:",{nodes:nodes,aBlock:aBlock,aCollection:aCollection}, smalltalk.ASTInterpreter)})},
|
792
|
+
args: ["nodes", "aBlock", "aCollection"],
|
793
|
+
source: "interpretAll: nodes continue: aBlock result: aCollection\x0a\x09nodes isEmpty \x0a \x09ifTrue: [ self continue: aBlock value: aCollection ]\x0a \x09ifFalse: [\x0a \x09\x09self interpret: nodes first continue: [:value |\x0a \x09\x09\x09self \x0a \x09interpretAll: nodes allButFirst \x0a continue: aBlock\x0a \x09\x09\x09\x09\x09result: aCollection, { value } ] ]",
|
794
|
+
messageSends: ["ifTrue:ifFalse:", "continue:value:", "interpret:continue:", "first", "interpretAll:continue:result:", "allButFirst", ",", "isEmpty"],
|
795
|
+
referencedClasses: []
|
796
|
+
}),
|
797
|
+
smalltalk.ASTInterpreter);
|
798
|
+
|
799
|
+
smalltalk.addMethod(
|
800
|
+
"_interpretAssignmentNode_continue_",
|
801
|
+
smalltalk.method({
|
802
|
+
selector: "interpretAssignmentNode:continue:",
|
803
|
+
category: 'interpreting',
|
804
|
+
fn: function (aNode,aBlock){
|
805
|
+
var self=this;
|
806
|
+
return smalltalk.withContext(function($ctx1) {
|
807
|
+
return smalltalk.withContext(function($ctx2) {
|
808
|
+
}, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
|
809
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretAssignmentNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
810
|
+
args: ["aNode", "aBlock"],
|
811
|
+
source: "interpretAssignmentNode: aNode continue: aBlock\x0a\x09self interpret: aNode right continue: [ :value |\x0a \x09self \x0a \x09continue: aBlock\x0a value: (self assign: aNode left to: value) ]",
|
812
|
+
messageSends: ["interpret:continue:", "right", "continue:value:", "assign:to:", "left"],
|
813
|
+
referencedClasses: []
|
814
|
+
}),
|
815
|
+
smalltalk.ASTInterpreter);
|
816
|
+
|
817
|
+
smalltalk.addMethod(
|
818
|
+
"_interpretBlockNode_continue_",
|
819
|
+
smalltalk.method({
|
820
|
+
selector: "interpretBlockNode:continue:",
|
821
|
+
category: 'interpreting',
|
822
|
+
fn: function (aNode,aBlock){
|
823
|
+
var self=this;
|
824
|
+
return smalltalk.withContext(function($ctx1) {
|
825
|
+
_st(self)._continue_value_(aBlock,(function(){
|
826
|
+
return smalltalk.withContext(function($ctx2) {
|
827
|
+
_st($1)._interpret_(_st(_st(aNode)._nodes())._first());
|
828
|
+
$2=_st($1)._result();
|
829
|
+
return $2;
|
830
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
831
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
832
|
+
args: ["aNode", "aBlock"],
|
833
|
+
source: "interpretBlockNode: aNode continue: aBlock\x0a\x09\x22TODO: Context should be set\x22\x0a \x0a self \x0a \x09continue: aBlock \x0a value: [ self interpret: aNode nodes first; result ]",
|
834
|
+
messageSends: ["continue:value:", "interpret:", "first", "nodes", "result"],
|
835
|
+
referencedClasses: []
|
836
|
+
}),
|
837
|
+
smalltalk.ASTInterpreter);
|
838
|
+
|
839
|
+
smalltalk.addMethod(
|
840
|
+
"_interpretBlockSequenceNode_continue_",
|
841
|
+
smalltalk.method({
|
842
|
+
selector: "interpretBlockSequenceNode:continue:",
|
843
|
+
category: 'interpreting',
|
844
|
+
fn: function (aNode,aBlock){
|
845
|
+
var self=this;
|
846
|
+
return smalltalk.withContext(function($ctx1) {
|
847
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretBlockSequenceNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
848
|
+
args: ["aNode", "aBlock"],
|
849
|
+
source: "interpretBlockSequenceNode: aNode continue: aBlock\x0a\x09self interpretSequenceNode: aNode continue: aBlock",
|
850
|
+
messageSends: ["interpretSequenceNode:continue:"],
|
851
|
+
referencedClasses: []
|
852
|
+
}),
|
853
|
+
smalltalk.ASTInterpreter);
|
854
|
+
|
855
|
+
smalltalk.addMethod(
|
856
|
+
"_interpretCascadeNode_continue_",
|
857
|
+
smalltalk.method({
|
858
|
+
selector: "interpretCascadeNode:continue:",
|
859
|
+
category: 'interpreting',
|
860
|
+
fn: function (aNode,aBlock){
|
861
|
+
var self=this;
|
862
|
+
return smalltalk.withContext(function($ctx1) {
|
863
|
+
return smalltalk.withContext(function($ctx2) {
|
864
|
+
return smalltalk.withContext(function($ctx3) {
|
865
|
+
}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
|
866
|
+
return _st(self)._interpretAll_continue_(_st(_st(aNode)._nodes())._allButLast(),(function(){
|
867
|
+
return smalltalk.withContext(function($ctx3) {
|
868
|
+
return smalltalk.withContext(function($ctx4) {
|
869
|
+
}, function($ctx4) {$ctx4.fillBlock({val:val},$ctx1)})}));
|
870
|
+
}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
871
|
+
}, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
|
872
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretCascadeNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
873
|
+
args: ["aNode", "aBlock"],
|
874
|
+
source: "interpretCascadeNode: aNode continue: aBlock\x0a\x09\x22TODO: Handle super sends\x22\x0a\x09\x0a self interpret: aNode receiver continue: [ :receiver |\x0a\x09\x09\x22Only interpret the receiver once\x22\x0a aNode nodes do: [ :each | each receiver: receiver ].\x0a \x0a \x09self \x0a \x09interpretAll: aNode nodes allButLast\x0a \x09\x09continue: [\x0a \x09self \x0a \x09interpret: aNode nodes last\x0a \x09continue: [ :val | self continue: aBlock value: val ] ] ]",
|
875
|
+
messageSends: ["interpret:continue:", "receiver", "do:", "receiver:", "nodes", "interpretAll:continue:", "allButLast", "last", "continue:value:"],
|
876
|
+
referencedClasses: []
|
877
|
+
}),
|
878
|
+
smalltalk.ASTInterpreter);
|
879
|
+
|
880
|
+
smalltalk.addMethod(
|
881
|
+
"_interpretClassReferenceNode_continue_",
|
882
|
+
smalltalk.method({
|
883
|
+
selector: "interpretClassReferenceNode:continue:",
|
884
|
+
category: 'interpreting',
|
885
|
+
fn: function (aNode,aBlock){
|
886
|
+
var self=this;
|
887
|
+
return smalltalk.withContext(function($ctx1) {
|
888
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretClassReferenceNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
889
|
+
args: ["aNode", "aBlock"],
|
890
|
+
source: "interpretClassReferenceNode: aNode continue: aBlock\x0a\x09self continue: aBlock value: (Smalltalk current at: aNode value)",
|
891
|
+
messageSends: ["continue:value:", "at:", "value", "current"],
|
892
|
+
referencedClasses: ["Smalltalk"]
|
893
|
+
}),
|
894
|
+
smalltalk.ASTInterpreter);
|
895
|
+
|
896
|
+
smalltalk.addMethod(
|
897
|
+
"_interpretDynamicArrayNode_continue_",
|
898
|
+
smalltalk.method({
|
899
|
+
selector: "interpretDynamicArrayNode:continue:",
|
900
|
+
category: 'interpreting',
|
901
|
+
fn: function (aNode,aBlock){
|
902
|
+
var self=this;
|
903
|
+
return smalltalk.withContext(function($ctx1) {
|
904
|
+
return smalltalk.withContext(function($ctx2) {
|
905
|
+
}, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
|
906
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicArrayNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
907
|
+
args: ["aNode", "aBlock"],
|
908
|
+
source: "interpretDynamicArrayNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a \x09self \x0a \x09continue: aBlock\x0a\x09\x09\x09value: array ]",
|
909
|
+
messageSends: ["interpretAll:continue:", "nodes", "continue:value:"],
|
910
|
+
referencedClasses: []
|
911
|
+
}),
|
912
|
+
smalltalk.ASTInterpreter);
|
913
|
+
|
914
|
+
smalltalk.addMethod(
|
915
|
+
"_interpretDynamicDictionaryNode_continue_",
|
916
|
+
smalltalk.method({
|
917
|
+
selector: "interpretDynamicDictionaryNode:continue:",
|
918
|
+
category: 'interpreting',
|
919
|
+
fn: function (aNode,aBlock){
|
920
|
+
var self=this;
|
921
|
+
return smalltalk.withContext(function($ctx1) {
|
922
|
+
var hashedCollection;
|
923
|
+
return smalltalk.withContext(function($ctx2) {
|
924
|
+
hashedCollection;
|
925
|
+
_st(array)._do_((function(each){
|
926
|
+
return smalltalk.withContext(function($ctx3) {
|
927
|
+
}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
|
928
|
+
return _st(self)._continue_value_(aBlock,hashedCollection);
|
929
|
+
}, function($ctx2) {$ctx2.fillBlock({array:array,hashedCollection:hashedCollection},$ctx1)})}));
|
930
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretDynamicDictionaryNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
931
|
+
args: ["aNode", "aBlock"],
|
932
|
+
source: "interpretDynamicDictionaryNode: aNode continue: aBlock\x0a self interpretAll: aNode nodes continue: [ :array | | hashedCollection |\x0a \x09hashedCollection := HashedCollection new.\x0a array do: [ :each | hashedCollection add: each ].\x0a self \x09\x0a \x09continue: aBlock\x0a value: hashedCollection ]",
|
933
|
+
messageSends: ["interpretAll:continue:", "nodes", "new", "do:", "add:", "continue:value:"],
|
934
|
+
referencedClasses: ["HashedCollection"]
|
935
|
+
}),
|
936
|
+
smalltalk.ASTInterpreter);
|
937
|
+
|
938
|
+
smalltalk.addMethod(
|
939
|
+
"_interpretJSStatementNode_continue_",
|
940
|
+
smalltalk.method({
|
941
|
+
selector: "interpretJSStatementNode:continue:",
|
942
|
+
category: 'interpreting',
|
943
|
+
fn: function (aNode,aBlock){
|
944
|
+
var self=this;
|
945
|
+
return smalltalk.withContext(function($ctx1) {
|
946
|
+
_st(self)._continue_value_(aBlock,_st(self)._eval_(_st(aNode)._source()));
|
947
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretJSStatementNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
948
|
+
args: ["aNode", "aBlock"],
|
949
|
+
source: "interpretJSStatementNode: aNode continue: aBlock\x0a\x09shouldReturn := true.\x0a\x09self continue: aBlock value: (self eval: aNode source)",
|
950
|
+
messageSends: ["continue:value:", "eval:", "source"],
|
951
|
+
referencedClasses: []
|
952
|
+
}),
|
953
|
+
smalltalk.ASTInterpreter);
|
954
|
+
|
955
|
+
smalltalk.addMethod(
|
956
|
+
"_interpretMethodNode_continue_",
|
957
|
+
smalltalk.method({
|
958
|
+
selector: "interpretMethodNode:continue:",
|
959
|
+
category: 'interpreting',
|
960
|
+
fn: function (aNode,aBlock){
|
961
|
+
var self=this;
|
962
|
+
return smalltalk.withContext(function($ctx1) {
|
963
|
+
return smalltalk.withContext(function($ctx2) {
|
964
|
+
}, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
|
965
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretMethodNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
966
|
+
args: ["aNode", "aBlock"],
|
967
|
+
source: "interpretMethodNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a \x09self continue: aBlock value: array first ]",
|
968
|
+
messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "first"],
|
969
|
+
referencedClasses: []
|
970
|
+
}),
|
971
|
+
smalltalk.ASTInterpreter);
|
972
|
+
|
973
|
+
smalltalk.addMethod(
|
974
|
+
"_interpretNode_continue_",
|
975
|
+
smalltalk.method({
|
976
|
+
selector: "interpretNode:continue:",
|
977
|
+
category: 'interpreting',
|
978
|
+
fn: function (aNode,aBlock){
|
979
|
+
var self=this;
|
980
|
+
return smalltalk.withContext(function($ctx1) {
|
981
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
982
|
+
args: ["aNode", "aBlock"],
|
983
|
+
source: "interpretNode: aNode continue: aBlock\x0a aNode interpreter: self continue: aBlock",
|
984
|
+
messageSends: ["interpreter:continue:"],
|
985
|
+
referencedClasses: []
|
986
|
+
}),
|
987
|
+
smalltalk.ASTInterpreter);
|
988
|
+
|
989
|
+
smalltalk.addMethod(
|
990
|
+
"_interpretReturnNode_continue_",
|
991
|
+
smalltalk.method({
|
992
|
+
selector: "interpretReturnNode:continue:",
|
993
|
+
category: 'interpreting',
|
994
|
+
fn: function (aNode,aBlock){
|
995
|
+
var self=this;
|
996
|
+
return smalltalk.withContext(function($ctx1) {
|
997
|
+
return smalltalk.withContext(function($ctx2) {
|
998
|
+
self["@shouldReturn"];
|
999
|
+
return _st(self)._continue_value_(aBlock,value);
|
1000
|
+
}, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
|
1001
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretReturnNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1002
|
+
args: ["aNode", "aBlock"],
|
1003
|
+
source: "interpretReturnNode: aNode continue: aBlock\x0a self interpret: aNode nodes first continue: [ :value |\x0a \x09shouldReturn := true.\x0a\x09\x09self continue: aBlock value: value ]",
|
1004
|
+
messageSends: ["interpret:continue:", "first", "nodes", "continue:value:"],
|
1005
|
+
referencedClasses: []
|
1006
|
+
}),
|
1007
|
+
smalltalk.ASTInterpreter);
|
1008
|
+
|
1009
|
+
smalltalk.addMethod(
|
1010
|
+
"_interpretSendNode_continue_",
|
1011
|
+
smalltalk.method({
|
1012
|
+
selector: "interpretSendNode:continue:",
|
1013
|
+
category: 'interpreting',
|
1014
|
+
fn: function (aNode,aBlock){
|
1015
|
+
var self=this;
|
1016
|
+
return smalltalk.withContext(function($ctx1) {
|
1017
|
+
return smalltalk.withContext(function($ctx2) {
|
1018
|
+
return smalltalk.withContext(function($ctx3) {
|
1019
|
+
return smalltalk.withContext(function($ctx4) {
|
1020
|
+
return _st(self)._continue_value_(aBlock,_st(message)._sendTo_(receiver));
|
1021
|
+
}, function($ctx4) {$ctx4.fillBlock({message:message},$ctx1)})}));
|
1022
|
+
}, function($ctx3) {$ctx3.fillBlock({args:args},$ctx1)})}));
|
1023
|
+
}, function($ctx2) {$ctx2.fillBlock({receiver:receiver},$ctx1)})}));
|
1024
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretSendNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1025
|
+
args: ["aNode", "aBlock"],
|
1026
|
+
source: "interpretSendNode: aNode continue: aBlock\x0a\x09\x22TODO: Handle super sends\x22\x0a \x0a self interpret: aNode receiver continue: [ :receiver |\x0a \x09self interpretAll: aNode arguments continue: [ :args |\x0a \x09\x09self \x0a \x09messageFromSendNode: aNode \x0a arguments: args\x0a do: [ :message |\x0a \x09\x09\x09self context pc: self context pc + 1.\x0a \x09\x09\x09self \x0a \x09\x09\x09continue: aBlock \x0a \x09\x09value: (message sendTo: receiver) ] ] ]",
|
1027
|
+
messageSends: ["interpret:continue:", "receiver", "interpretAll:continue:", "arguments", "messageFromSendNode:arguments:do:", "pc:", "+", "pc", "context", "continue:value:", "sendTo:"],
|
1028
|
+
referencedClasses: []
|
1029
|
+
}),
|
1030
|
+
smalltalk.ASTInterpreter);
|
1031
|
+
|
1032
|
+
smalltalk.addMethod(
|
1033
|
+
"_interpretSequenceNode_continue_",
|
1034
|
+
smalltalk.method({
|
1035
|
+
selector: "interpretSequenceNode:continue:",
|
1036
|
+
category: 'interpreting',
|
1037
|
+
fn: function (aNode,aBlock){
|
1038
|
+
var self=this;
|
1039
|
+
return smalltalk.withContext(function($ctx1) {
|
1040
|
+
return smalltalk.withContext(function($ctx2) {
|
1041
|
+
}, function($ctx2) {$ctx2.fillBlock({array:array},$ctx1)})}));
|
1042
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretSequenceNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1043
|
+
args: ["aNode", "aBlock"],
|
1044
|
+
source: "interpretSequenceNode: aNode continue: aBlock\x0a\x09self interpretAll: aNode nodes continue: [ :array |\x0a \x09self continue: aBlock value: array last ]",
|
1045
|
+
messageSends: ["interpretAll:continue:", "nodes", "continue:value:", "last"],
|
1046
|
+
referencedClasses: []
|
1047
|
+
}),
|
1048
|
+
smalltalk.ASTInterpreter);
|
1049
|
+
|
1050
|
+
smalltalk.addMethod(
|
1051
|
+
"_interpretValueNode_continue_",
|
1052
|
+
smalltalk.method({
|
1053
|
+
selector: "interpretValueNode:continue:",
|
1054
|
+
category: 'interpreting',
|
1055
|
+
fn: function (aNode,aBlock){
|
1056
|
+
var self=this;
|
1057
|
+
return smalltalk.withContext(function($ctx1) {
|
1058
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretValueNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1059
|
+
args: ["aNode", "aBlock"],
|
1060
|
+
source: "interpretValueNode: aNode continue: aBlock\x0a\x09self continue: aBlock value: aNode value",
|
1061
|
+
messageSends: ["continue:value:", "value"],
|
1062
|
+
referencedClasses: []
|
1063
|
+
}),
|
1064
|
+
smalltalk.ASTInterpreter);
|
1065
|
+
|
1066
|
+
smalltalk.addMethod(
|
1067
|
+
"_interpretVariableNode_continue_",
|
1068
|
+
smalltalk.method({
|
1069
|
+
selector: "interpretVariableNode:continue:",
|
1070
|
+
category: 'interpreting',
|
1071
|
+
fn: function (aNode,aBlock){
|
1072
|
+
var self=this;
|
1073
|
+
return smalltalk.withContext(function($ctx1) {
|
1074
|
+
$1=self;
|
1075
|
+
$2=aBlock;
|
1076
|
+
$4=_st(_st(aNode)._binding())._isInstanceVar();
|
1077
|
+
if(smalltalk.assert($4)){
|
1078
|
+
$3=_st(_st(_st(self)._context())._receiver())._instVarAt_(_st(aNode)._value());
|
1079
|
+
} else {
|
1080
|
+
$3=_st(_st(self)._context())._localAt_(_st(aNode)._value());
|
1081
|
+
};
|
1082
|
+
_st($1)._continue_value_($2,$3);
|
1083
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpretVariableNode:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1084
|
+
args: ["aNode", "aBlock"],
|
1085
|
+
source: "interpretVariableNode: aNode continue: aBlock\x0a self \x0a \x09continue: aBlock\x0a value: (aNode binding isInstanceVar\x0a\x09\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09\x09ifFalse: [ self context localAt: aNode value ])",
|
1086
|
+
messageSends: ["continue:value:", "ifTrue:ifFalse:", "instVarAt:", "value", "receiver", "context", "localAt:", "isInstanceVar", "binding"],
|
1087
|
+
referencedClasses: []
|
1088
|
+
}),
|
1089
|
+
smalltalk.ASTInterpreter);
|
1090
|
+
|
1091
|
+
smalltalk.addMethod(
|
1092
|
+
"_messageFromSendNode_arguments_do_",
|
1093
|
+
smalltalk.method({
|
1094
|
+
selector: "messageFromSendNode:arguments:do:",
|
1095
|
+
category: 'private',
|
1096
|
+
fn: function (aSendNode,aCollection,aBlock){
|
1097
|
+
var self=this;
|
1098
|
+
return smalltalk.withContext(function($ctx1) {
|
1099
|
+
$1=_st((smalltalk.Message || Message))._new();
|
1100
|
+
_st($1)._selector_(_st(aSendNode)._selector());
|
1101
|
+
_st($1)._arguments_(aCollection);
|
1102
|
+
$2=_st($1)._yourself();
|
1103
|
+
_st(self)._continue_value_(aBlock,$2);
|
1104
|
+
return self}, function($ctx1) {$ctx1.fill(self,"messageFromSendNode:arguments:do:",{aSendNode:aSendNode,aCollection:aCollection,aBlock:aBlock}, smalltalk.ASTInterpreter)})},
|
1105
|
+
args: ["aSendNode", "aCollection", "aBlock"],
|
1106
|
+
source: "messageFromSendNode: aSendNode arguments: aCollection do: aBlock\x0a self \x0a continue: aBlock\x0a value: (Message new\x0a \x09\x09selector: aSendNode selector;\x0a \x09arguments: aCollection;\x0a \x09yourself)",
|
1107
|
+
messageSends: ["continue:value:", "selector:", "selector", "new", "arguments:", "yourself"],
|
1108
|
+
referencedClasses: ["Message"]
|
1109
|
+
}),
|
1110
|
+
smalltalk.ASTInterpreter);
|
1111
|
+
|
1112
|
+
smalltalk.addMethod(
|
1113
|
+
"_result",
|
1114
|
+
smalltalk.method({
|
1115
|
+
selector: "result",
|
1116
|
+
category: 'accessing',
|
1117
|
+
fn: function (){
|
1118
|
+
var self=this;
|
1119
|
+
return smalltalk.withContext(function($ctx1) {
|
1120
|
+
$1=self["@result"];
|
1121
|
+
return $1;
|
1122
|
+
}, function($ctx1) {$ctx1.fill(self,"result",{}, smalltalk.ASTInterpreter)})},
|
1123
|
+
args: [],
|
1124
|
+
source: "result\x0a\x09^ result",
|
1125
|
+
messageSends: [],
|
1126
|
+
referencedClasses: []
|
1127
|
+
}),
|
1128
|
+
smalltalk.ASTInterpreter);
|
1129
|
+
|
1130
|
+
smalltalk.addMethod(
|
1131
|
+
"_shouldReturn",
|
1132
|
+
smalltalk.method({
|
1133
|
+
selector: "shouldReturn",
|
1134
|
+
category: 'testing',
|
1135
|
+
fn: function (){
|
1136
|
+
var self=this;
|
1137
|
+
return smalltalk.withContext(function($ctx1) {
|
1138
|
+
$2=self["@shouldReturn"];
|
1139
|
+
if(($receiver = $2) == nil || $receiver == undefined){
|
1140
|
+
$1=false;
|
1141
|
+
} else {
|
1142
|
+
$1=$2;
|
1143
|
+
};
|
1144
|
+
return $1;
|
1145
|
+
}, function($ctx1) {$ctx1.fill(self,"shouldReturn",{}, smalltalk.ASTInterpreter)})},
|
1146
|
+
args: [],
|
1147
|
+
source: "shouldReturn\x0a\x09^ shouldReturn ifNil: [ false ]",
|
1148
|
+
messageSends: ["ifNil:"],
|
1149
|
+
referencedClasses: []
|
1150
|
+
}),
|
1151
|
+
smalltalk.ASTInterpreter);
|
1152
|
+
|
1153
|
+
|
1154
|
+
|
1155
|
+
smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation', 'nextNode'], 'Compiler-Interpreter');
|
1156
|
+
smalltalk.ASTSteppingInterpreter.comment="ASTSteppingInterpreter is an interpreter with stepping capabilities.\x0aUse `#step` to actually interpret the next node.\x0a\x0aUsage example:\x0a\x0a | ast interpreter |\x0a ast := Smalltalk current parse: 'foo 1+2+4'.\x0a (SemanticAnalyzer on: Object) visit: ast.\x0a\x0a interpreter := ASTSteppingInterpreter new\x0a interpret: ast nodes first;\x0a yourself.\x0a \x0a debugger step; step.\x0a debugger step; step.\x0a debugger result.\x22Answers 1\x22\x0a debugger step.\x0a debugger result. \x22Answers 3\x22\x0a debugger step.\x0a debugger result. \x22Answers 7\x22\x0a "
|
1157
|
+
smalltalk.addMethod(
|
1158
|
+
"_atEnd",
|
1159
|
+
smalltalk.method({
|
1160
|
+
selector: "atEnd",
|
1161
|
+
category: 'testing',
|
1162
|
+
fn: function (){
|
1163
|
+
var self=this;
|
1164
|
+
return smalltalk.withContext(function($ctx1) {
|
1165
|
+
$1=_st(_st(self)._shouldReturn())._or_((function(){
|
1166
|
+
return smalltalk.withContext(function($ctx2) {
|
1167
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
1168
|
+
return $1;
|
1169
|
+
}, function($ctx1) {$ctx1.fill(self,"atEnd",{}, smalltalk.ASTSteppingInterpreter)})},
|
1170
|
+
args: [],
|
1171
|
+
source: "atEnd\x0a\x09^ self shouldReturn or: [ self nextNode == self currentNode ]",
|
1172
|
+
messageSends: ["or:", "==", "currentNode", "nextNode", "shouldReturn"],
|
1173
|
+
referencedClasses: []
|
1174
|
+
}),
|
1175
|
+
smalltalk.ASTSteppingInterpreter);
|
1176
|
+
|
1177
|
+
smalltalk.addMethod(
|
1178
|
+
"_initialize",
|
1179
|
+
smalltalk.method({
|
1180
|
+
selector: "initialize",
|
1181
|
+
category: 'initialization',
|
1182
|
+
fn: function (){
|
1183
|
+
var self=this;
|
1184
|
+
return smalltalk.withContext(function($ctx1) {
|
1185
|
+
self["@continuation"]=(function(){
|
1186
|
+
return smalltalk.withContext(function($ctx2) {
|
1187
|
+
return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ASTSteppingInterpreter)})},
|
1188
|
+
args: [],
|
1189
|
+
source: "initialize\x0a\x09super initialize.\x0a continuation := [ ]",
|
1190
|
+
messageSends: ["initialize"],
|
1191
|
+
referencedClasses: []
|
1192
|
+
}),
|
1193
|
+
smalltalk.ASTSteppingInterpreter);
|
1194
|
+
|
1195
|
+
smalltalk.addMethod(
|
1196
|
+
"_interpret_continue_",
|
1197
|
+
smalltalk.method({
|
1198
|
+
selector: "interpret:continue:",
|
1199
|
+
category: 'interpreting',
|
1200
|
+
fn: function (aNode,aBlock){
|
1201
|
+
var self=this;
|
1202
|
+
return smalltalk.withContext(function($ctx1) {
|
1203
|
+
self["@continuation"]=(function(){
|
1204
|
+
return smalltalk.withContext(function($ctx2) {
|
1205
|
+
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
1206
|
+
return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTSteppingInterpreter)})},
|
1207
|
+
args: ["aNode", "aBlock"],
|
1208
|
+
source: "interpret: aNode continue: aBlock\x0a\x09nextNode := aNode.\x0a\x09continuation := [ \x0a \x09super interpret: aNode continue: aBlock ]",
|
1209
|
+
messageSends: ["interpret:continue:"],
|
1210
|
+
referencedClasses: []
|
1211
|
+
}),
|
1212
|
+
smalltalk.ASTSteppingInterpreter);
|
1213
|
+
|
1214
|
+
smalltalk.addMethod(
|
1215
|
+
"_nextNode",
|
1216
|
+
smalltalk.method({
|
1217
|
+
selector: "nextNode",
|
1218
|
+
category: 'accessing',
|
1219
|
+
fn: function (){
|
1220
|
+
var self=this;
|
1221
|
+
return smalltalk.withContext(function($ctx1) {
|
1222
|
+
$1=self["@nextNode"];
|
1223
|
+
return $1;
|
1224
|
+
}, function($ctx1) {$ctx1.fill(self,"nextNode",{}, smalltalk.ASTSteppingInterpreter)})},
|
1225
|
+
args: [],
|
1226
|
+
source: "nextNode\x0a\x09^ nextNode",
|
1227
|
+
messageSends: [],
|
1228
|
+
referencedClasses: []
|
1229
|
+
}),
|
1230
|
+
smalltalk.ASTSteppingInterpreter);
|
1231
|
+
|
1232
|
+
smalltalk.addMethod(
|
1233
|
+
"_step",
|
1234
|
+
smalltalk.method({
|
1235
|
+
selector: "step",
|
1236
|
+
category: 'stepping',
|
1237
|
+
fn: function (){
|
1238
|
+
var self=this;
|
1239
|
+
return smalltalk.withContext(function($ctx1) {
|
1240
|
+
return self}, function($ctx1) {$ctx1.fill(self,"step",{}, smalltalk.ASTSteppingInterpreter)})},
|
1241
|
+
args: [],
|
1242
|
+
source: "step\x0a\x09continuation value",
|
1243
|
+
messageSends: ["value"],
|
1244
|
+
referencedClasses: []
|
1245
|
+
}),
|
1246
|
+
smalltalk.ASTSteppingInterpreter);
|
1247
|
+
|
1248
|
+
|
1249
|
+
|
1250
|
+
smalltalk.addMethod(
|
1251
|
+
"_interpreter_continue_",
|
1252
|
+
smalltalk.method({
|
1253
|
+
selector: "interpreter:continue:",
|
1254
|
+
category: '*Compiler-Interpreter',
|
1255
|
+
fn: function (anInterpreter,aBlock){
|
1256
|
+
var self=this;
|
1257
|
+
return smalltalk.withContext(function($ctx1) {
|
1258
|
+
$1=_st(anInterpreter)._interpretNode_continue_(self,aBlock);
|
1259
|
+
return $1;
|
1260
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.Node)})},
|
1261
|
+
args: ["anInterpreter", "aBlock"],
|
1262
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretNode: self continue: aBlock",
|
1263
|
+
messageSends: ["interpretNode:continue:"],
|
1264
|
+
referencedClasses: []
|
1265
|
+
}),
|
1266
|
+
smalltalk.Node);
|
1267
|
+
|
1268
|
+
smalltalk.addMethod(
|
1269
|
+
"_isSteppingNode",
|
1270
|
+
smalltalk.method({
|
1271
|
+
selector: "isSteppingNode",
|
1272
|
+
category: '*Compiler-Interpreter',
|
1273
|
+
fn: function (){
|
1274
|
+
var self=this;
|
1275
|
+
return smalltalk.withContext(function($ctx1) {
|
1276
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.Node)})},
|
1277
|
+
args: [],
|
1278
|
+
source: "isSteppingNode\x0a\x09^ false",
|
1279
|
+
messageSends: [],
|
1280
|
+
referencedClasses: []
|
1281
|
+
}),
|
1282
|
+
smalltalk.Node);
|
1283
|
+
|
1284
|
+
smalltalk.addMethod(
|
1285
|
+
"_interpreter_continue_",
|
1286
|
+
smalltalk.method({
|
1287
|
+
selector: "interpreter:continue:",
|
1288
|
+
category: '*Compiler-Interpreter',
|
1289
|
+
fn: function (anInterpreter,aBlock){
|
1290
|
+
var self=this;
|
1291
|
+
return smalltalk.withContext(function($ctx1) {
|
1292
|
+
$1=_st(anInterpreter)._interpretAssignmentNode_continue_(self,aBlock);
|
1293
|
+
return $1;
|
1294
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.AssignmentNode)})},
|
1295
|
+
args: ["anInterpreter", "aBlock"],
|
1296
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretAssignmentNode: self continue: aBlock",
|
1297
|
+
messageSends: ["interpretAssignmentNode:continue:"],
|
1298
|
+
referencedClasses: []
|
1299
|
+
}),
|
1300
|
+
smalltalk.AssignmentNode);
|
1301
|
+
|
1302
|
+
smalltalk.addMethod(
|
1303
|
+
"_isSteppingNode",
|
1304
|
+
smalltalk.method({
|
1305
|
+
selector: "isSteppingNode",
|
1306
|
+
category: '*Compiler-Interpreter',
|
1307
|
+
fn: function (){
|
1308
|
+
var self=this;
|
1309
|
+
return smalltalk.withContext(function($ctx1) {
|
1310
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.AssignmentNode)})},
|
1311
|
+
args: [],
|
1312
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1313
|
+
messageSends: [],
|
1314
|
+
referencedClasses: []
|
1315
|
+
}),
|
1316
|
+
smalltalk.AssignmentNode);
|
1317
|
+
|
1318
|
+
smalltalk.addMethod(
|
1319
|
+
"_interpreter_continue_",
|
1320
|
+
smalltalk.method({
|
1321
|
+
selector: "interpreter:continue:",
|
1322
|
+
category: '*Compiler-Interpreter',
|
1323
|
+
fn: function (anInterpreter,aBlock){
|
1324
|
+
var self=this;
|
1325
|
+
return smalltalk.withContext(function($ctx1) {
|
1326
|
+
$1=_st(anInterpreter)._interpretBlockNode_continue_(self,aBlock);
|
1327
|
+
return $1;
|
1328
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.BlockNode)})},
|
1329
|
+
args: ["anInterpreter", "aBlock"],
|
1330
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretBlockNode: self continue: aBlock",
|
1331
|
+
messageSends: ["interpretBlockNode:continue:"],
|
1332
|
+
referencedClasses: []
|
1333
|
+
}),
|
1334
|
+
smalltalk.BlockNode);
|
1335
|
+
|
1336
|
+
smalltalk.addMethod(
|
1337
|
+
"_isSteppingNode",
|
1338
|
+
smalltalk.method({
|
1339
|
+
selector: "isSteppingNode",
|
1340
|
+
category: '*Compiler-Interpreter',
|
1341
|
+
fn: function (){
|
1342
|
+
var self=this;
|
1343
|
+
return smalltalk.withContext(function($ctx1) {
|
1344
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.BlockNode)})},
|
1345
|
+
args: [],
|
1346
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1347
|
+
messageSends: [],
|
1348
|
+
referencedClasses: []
|
1349
|
+
}),
|
1350
|
+
smalltalk.BlockNode);
|
1351
|
+
|
1352
|
+
smalltalk.addMethod(
|
1353
|
+
"_interpreter_continue_",
|
1354
|
+
smalltalk.method({
|
1355
|
+
selector: "interpreter:continue:",
|
1356
|
+
category: '*Compiler-Interpreter',
|
1357
|
+
fn: function (anInterpreter,aBlock){
|
1358
|
+
var self=this;
|
1359
|
+
return smalltalk.withContext(function($ctx1) {
|
1360
|
+
$1=_st(anInterpreter)._interpretCascadeNode_continue_(self,aBlock);
|
1361
|
+
return $1;
|
1362
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.CascadeNode)})},
|
1363
|
+
args: ["anInterpreter", "aBlock"],
|
1364
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretCascadeNode: self continue: aBlock",
|
1365
|
+
messageSends: ["interpretCascadeNode:continue:"],
|
1366
|
+
referencedClasses: []
|
1367
|
+
}),
|
1368
|
+
smalltalk.CascadeNode);
|
1369
|
+
|
1370
|
+
smalltalk.addMethod(
|
1371
|
+
"_interpreter_continue_",
|
1372
|
+
smalltalk.method({
|
1373
|
+
selector: "interpreter:continue:",
|
1374
|
+
category: '*Compiler-Interpreter',
|
1375
|
+
fn: function (anInterpreter,aBlock){
|
1376
|
+
var self=this;
|
1377
|
+
return smalltalk.withContext(function($ctx1) {
|
1378
|
+
$1=_st(anInterpreter)._interpretDynamicArrayNode_continue_(self,aBlock);
|
1379
|
+
return $1;
|
1380
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.DynamicArrayNode)})},
|
1381
|
+
args: ["anInterpreter", "aBlock"],
|
1382
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretDynamicArrayNode: self continue: aBlock",
|
1383
|
+
messageSends: ["interpretDynamicArrayNode:continue:"],
|
1384
|
+
referencedClasses: []
|
1385
|
+
}),
|
1386
|
+
smalltalk.DynamicArrayNode);
|
1387
|
+
|
1388
|
+
smalltalk.addMethod(
|
1389
|
+
"_isSteppingNode",
|
1390
|
+
smalltalk.method({
|
1391
|
+
selector: "isSteppingNode",
|
1392
|
+
category: '*Compiler-Interpreter',
|
1393
|
+
fn: function (){
|
1394
|
+
var self=this;
|
1395
|
+
return smalltalk.withContext(function($ctx1) {
|
1396
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.DynamicArrayNode)})},
|
1397
|
+
args: [],
|
1398
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1399
|
+
messageSends: [],
|
1400
|
+
referencedClasses: []
|
1401
|
+
}),
|
1402
|
+
smalltalk.DynamicArrayNode);
|
1403
|
+
|
1404
|
+
smalltalk.addMethod(
|
1405
|
+
"_interpreter_continue_",
|
1406
|
+
smalltalk.method({
|
1407
|
+
selector: "interpreter:continue:",
|
1408
|
+
category: '*Compiler-Interpreter',
|
1409
|
+
fn: function (anInterpreter,aBlock){
|
1410
|
+
var self=this;
|
1411
|
+
return smalltalk.withContext(function($ctx1) {
|
1412
|
+
$1=_st(anInterpreter)._interpretDynamicDictionaryNode_continue_(self,aBlock);
|
1413
|
+
return $1;
|
1414
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.DynamicDictionaryNode)})},
|
1415
|
+
args: ["anInterpreter", "aBlock"],
|
1416
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretDynamicDictionaryNode: self continue: aBlock",
|
1417
|
+
messageSends: ["interpretDynamicDictionaryNode:continue:"],
|
1418
|
+
referencedClasses: []
|
1419
|
+
}),
|
1420
|
+
smalltalk.DynamicDictionaryNode);
|
1421
|
+
|
1422
|
+
smalltalk.addMethod(
|
1423
|
+
"_isSteppingNode",
|
1424
|
+
smalltalk.method({
|
1425
|
+
selector: "isSteppingNode",
|
1426
|
+
category: '*Compiler-Interpreter',
|
1427
|
+
fn: function (){
|
1428
|
+
var self=this;
|
1429
|
+
return smalltalk.withContext(function($ctx1) {
|
1430
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.DynamicDictionaryNode)})},
|
1431
|
+
args: [],
|
1432
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1433
|
+
messageSends: [],
|
1434
|
+
referencedClasses: []
|
1435
|
+
}),
|
1436
|
+
smalltalk.DynamicDictionaryNode);
|
1437
|
+
|
1438
|
+
smalltalk.addMethod(
|
1439
|
+
"_interpreter_continue_",
|
1440
|
+
smalltalk.method({
|
1441
|
+
selector: "interpreter:continue:",
|
1442
|
+
category: '*Compiler-Interpreter',
|
1443
|
+
fn: function (anInterpreter,aBlock){
|
1444
|
+
var self=this;
|
1445
|
+
return smalltalk.withContext(function($ctx1) {
|
1446
|
+
$1=_st(anInterpreter)._interpretJSStatementNode_continue_(self,aBlock);
|
1447
|
+
return $1;
|
1448
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.JSStatementNode)})},
|
1449
|
+
args: ["anInterpreter", "aBlock"],
|
1450
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretJSStatementNode: self continue: aBlock",
|
1451
|
+
messageSends: ["interpretJSStatementNode:continue:"],
|
1452
|
+
referencedClasses: []
|
1453
|
+
}),
|
1454
|
+
smalltalk.JSStatementNode);
|
1455
|
+
|
1456
|
+
smalltalk.addMethod(
|
1457
|
+
"_isSteppingNode",
|
1458
|
+
smalltalk.method({
|
1459
|
+
selector: "isSteppingNode",
|
1460
|
+
category: '*Compiler-Interpreter',
|
1461
|
+
fn: function (){
|
1462
|
+
var self=this;
|
1463
|
+
return smalltalk.withContext(function($ctx1) {
|
1464
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.JSStatementNode)})},
|
1465
|
+
args: [],
|
1466
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1467
|
+
messageSends: [],
|
1468
|
+
referencedClasses: []
|
1469
|
+
}),
|
1470
|
+
smalltalk.JSStatementNode);
|
1471
|
+
|
1472
|
+
smalltalk.addMethod(
|
1473
|
+
"_interpreter_continue_",
|
1474
|
+
smalltalk.method({
|
1475
|
+
selector: "interpreter:continue:",
|
1476
|
+
category: '*Compiler-Interpreter',
|
1477
|
+
fn: function (anInterpreter,aBlock){
|
1478
|
+
var self=this;
|
1479
|
+
return smalltalk.withContext(function($ctx1) {
|
1480
|
+
$1=_st(anInterpreter)._interpretMethodNode_continue_(self,aBlock);
|
1481
|
+
return $1;
|
1482
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.MethodNode)})},
|
1483
|
+
args: ["anInterpreter", "aBlock"],
|
1484
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretMethodNode: self continue: aBlock",
|
1485
|
+
messageSends: ["interpretMethodNode:continue:"],
|
1486
|
+
referencedClasses: []
|
1487
|
+
}),
|
1488
|
+
smalltalk.MethodNode);
|
1489
|
+
|
1490
|
+
smalltalk.addMethod(
|
1491
|
+
"_interpreter_continue_",
|
1492
|
+
smalltalk.method({
|
1493
|
+
selector: "interpreter:continue:",
|
1494
|
+
category: '*Compiler-Interpreter',
|
1495
|
+
fn: function (anInterpreter,aBlock){
|
1496
|
+
var self=this;
|
1497
|
+
return smalltalk.withContext(function($ctx1) {
|
1498
|
+
$1=_st(anInterpreter)._interpretReturnNode_continue_(self,aBlock);
|
1499
|
+
return $1;
|
1500
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.ReturnNode)})},
|
1501
|
+
args: ["anInterpreter", "aBlock"],
|
1502
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretReturnNode: self continue: aBlock",
|
1503
|
+
messageSends: ["interpretReturnNode:continue:"],
|
1504
|
+
referencedClasses: []
|
1505
|
+
}),
|
1506
|
+
smalltalk.ReturnNode);
|
1507
|
+
|
1508
|
+
smalltalk.addMethod(
|
1509
|
+
"_interpreter_continue_",
|
1510
|
+
smalltalk.method({
|
1511
|
+
selector: "interpreter:continue:",
|
1512
|
+
category: '*Compiler-Interpreter',
|
1513
|
+
fn: function (anInterpreter,aBlock){
|
1514
|
+
var self=this;
|
1515
|
+
return smalltalk.withContext(function($ctx1) {
|
1516
|
+
$1=_st(anInterpreter)._interpretSendNode_continue_(self,aBlock);
|
1517
|
+
return $1;
|
1518
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.SendNode)})},
|
1519
|
+
args: ["anInterpreter", "aBlock"],
|
1520
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretSendNode: self continue: aBlock",
|
1521
|
+
messageSends: ["interpretSendNode:continue:"],
|
1522
|
+
referencedClasses: []
|
1523
|
+
}),
|
1524
|
+
smalltalk.SendNode);
|
1525
|
+
|
1526
|
+
smalltalk.addMethod(
|
1527
|
+
"_isSteppingNode",
|
1528
|
+
smalltalk.method({
|
1529
|
+
selector: "isSteppingNode",
|
1530
|
+
category: '*Compiler-Interpreter',
|
1531
|
+
fn: function (){
|
1532
|
+
var self=this;
|
1533
|
+
return smalltalk.withContext(function($ctx1) {
|
1534
|
+
}, function($ctx1) {$ctx1.fill(self,"isSteppingNode",{}, smalltalk.SendNode)})},
|
1535
|
+
args: [],
|
1536
|
+
source: "isSteppingNode\x0a\x09^ true",
|
1537
|
+
messageSends: [],
|
1538
|
+
referencedClasses: []
|
1539
|
+
}),
|
1540
|
+
smalltalk.SendNode);
|
1541
|
+
|
1542
|
+
smalltalk.addMethod(
|
1543
|
+
"_interpreter_continue_",
|
1544
|
+
smalltalk.method({
|
1545
|
+
selector: "interpreter:continue:",
|
1546
|
+
category: '*Compiler-Interpreter',
|
1547
|
+
fn: function (anInterpreter,aBlock){
|
1548
|
+
var self=this;
|
1549
|
+
return smalltalk.withContext(function($ctx1) {
|
1550
|
+
$1=_st(anInterpreter)._interpretSequenceNode_continue_(self,aBlock);
|
1551
|
+
return $1;
|
1552
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.SequenceNode)})},
|
1553
|
+
args: ["anInterpreter", "aBlock"],
|
1554
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretSequenceNode: self continue: aBlock",
|
1555
|
+
messageSends: ["interpretSequenceNode:continue:"],
|
1556
|
+
referencedClasses: []
|
1557
|
+
}),
|
1558
|
+
smalltalk.SequenceNode);
|
1559
|
+
|
1560
|
+
smalltalk.addMethod(
|
1561
|
+
"_interpreter_continue_",
|
1562
|
+
smalltalk.method({
|
1563
|
+
selector: "interpreter:continue:",
|
1564
|
+
category: '*Compiler-Interpreter',
|
1565
|
+
fn: function (anInterpreter,aBlock){
|
1566
|
+
var self=this;
|
1567
|
+
return smalltalk.withContext(function($ctx1) {
|
1568
|
+
$1=_st(anInterpreter)._interpretBlockSequenceNode_continue_(self,aBlock);
|
1569
|
+
return $1;
|
1570
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.BlockSequenceNode)})},
|
1571
|
+
args: ["anInterpreter", "aBlock"],
|
1572
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretBlockSequenceNode: self continue: aBlock",
|
1573
|
+
messageSends: ["interpretBlockSequenceNode:continue:"],
|
1574
|
+
referencedClasses: []
|
1575
|
+
}),
|
1576
|
+
smalltalk.BlockSequenceNode);
|
1577
|
+
|
1578
|
+
smalltalk.addMethod(
|
1579
|
+
"_interpreter_continue_",
|
1580
|
+
smalltalk.method({
|
1581
|
+
selector: "interpreter:continue:",
|
1582
|
+
category: '*Compiler-Interpreter',
|
1583
|
+
fn: function (anInterpreter,aBlock){
|
1584
|
+
var self=this;
|
1585
|
+
return smalltalk.withContext(function($ctx1) {
|
1586
|
+
$1=_st(anInterpreter)._interpretValueNode_continue_(self,aBlock);
|
1587
|
+
return $1;
|
1588
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.ValueNode)})},
|
1589
|
+
args: ["anInterpreter", "aBlock"],
|
1590
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretValueNode: self continue: aBlock",
|
1591
|
+
messageSends: ["interpretValueNode:continue:"],
|
1592
|
+
referencedClasses: []
|
1593
|
+
}),
|
1594
|
+
smalltalk.ValueNode);
|
1595
|
+
|
1596
|
+
smalltalk.addMethod(
|
1597
|
+
"_interpreter_continue_",
|
1598
|
+
smalltalk.method({
|
1599
|
+
selector: "interpreter:continue:",
|
1600
|
+
category: '*Compiler-Interpreter',
|
1601
|
+
fn: function (anInterpreter,aBlock){
|
1602
|
+
var self=this;
|
1603
|
+
return smalltalk.withContext(function($ctx1) {
|
1604
|
+
$1=_st(anInterpreter)._interpretVariableNode_continue_(self,aBlock);
|
1605
|
+
return $1;
|
1606
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.VariableNode)})},
|
1607
|
+
args: ["anInterpreter", "aBlock"],
|
1608
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretVariableNode: self continue: aBlock",
|
1609
|
+
messageSends: ["interpretVariableNode:continue:"],
|
1610
|
+
referencedClasses: []
|
1611
|
+
}),
|
1612
|
+
smalltalk.VariableNode);
|
1613
|
+
|
1614
|
+
smalltalk.addMethod(
|
1615
|
+
"_interpreter_continue_",
|
1616
|
+
smalltalk.method({
|
1617
|
+
selector: "interpreter:continue:",
|
1618
|
+
category: '*Compiler-Interpreter',
|
1619
|
+
fn: function (anInterpreter,aBlock){
|
1620
|
+
var self=this;
|
1621
|
+
return smalltalk.withContext(function($ctx1) {
|
1622
|
+
$1=_st(anInterpreter)._interpretClassReferenceNode_continue_(self,aBlock);
|
1623
|
+
return $1;
|
1624
|
+
}, function($ctx1) {$ctx1.fill(self,"interpreter:continue:",{anInterpreter:anInterpreter,aBlock:aBlock}, smalltalk.ClassReferenceNode)})},
|
1625
|
+
args: ["anInterpreter", "aBlock"],
|
1626
|
+
source: "interpreter: anInterpreter continue: aBlock\x0a\x09^ anInterpreter interpretClassReferenceNode: self continue: aBlock",
|
1627
|
+
messageSends: ["interpretClassReferenceNode:continue:"],
|
1628
|
+
referencedClasses: []
|
1629
|
+
}),
|
1630
|
+
smalltalk.ClassReferenceNode);
|
1631
|
+
|