resin 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/css/amber-normalize.css +73 -73
- data/amber/css/amber-normalize.less +1 -1
- data/amber/css/amber.css +106 -106
- data/amber/css/helios.css +242 -0
- data/amber/images/hsplitter.png +0 -0
- data/amber/images/vsplitter.png +0 -0
- data/amber/js/Benchfib.deploy.js +116 -38
- data/amber/js/Benchfib.js +120 -42
- data/amber/js/Canvas.deploy.js +674 -403
- data/amber/js/Canvas.js +682 -411
- data/amber/js/Compiler-AST.deploy.js +1150 -0
- data/amber/js/Compiler-AST.js +1591 -0
- data/amber/js/Compiler-Core.deploy.js +1562 -0
- data/amber/js/Compiler-Core.js +1972 -0
- data/amber/js/Compiler-Exceptions.deploy.js +114 -0
- data/amber/js/Compiler-Exceptions.js +161 -0
- data/amber/js/Compiler-IR.deploy.js +2326 -0
- data/amber/js/Compiler-IR.js +3146 -0
- data/amber/js/Compiler-Inlining.deploy.js +1147 -0
- data/amber/js/Compiler-Inlining.js +1514 -0
- data/amber/js/Compiler-Semantic.deploy.js +1207 -0
- data/amber/js/Compiler-Semantic.js +1628 -0
- data/amber/js/Compiler-Tests.deploy.js +646 -60
- data/amber/js/Compiler-Tests.js +843 -82
- data/amber/js/Compiler.deploy.js +1097 -159
- data/amber/js/Compiler.js +1414 -161
- data/amber/js/Examples.deploy.js +31 -15
- data/amber/js/Examples.js +33 -17
- data/amber/js/Helios-Announcements.deploy.js +127 -0
- data/amber/js/Helios-Announcements.js +157 -0
- data/amber/js/Helios-Browser.deploy.js +1473 -0
- data/amber/js/Helios-Browser.js +1953 -0
- data/amber/js/Helios-Commands.deploy.js +403 -0
- data/amber/js/Helios-Commands.js +563 -0
- data/amber/js/Helios-Core.deploy.js +1070 -0
- data/amber/js/Helios-Core.js +1445 -0
- data/amber/js/Helios-Environments.deploy.js +132 -0
- data/amber/js/Helios-Environments.js +179 -0
- data/amber/js/Helios-Inspector.deploy.js +855 -0
- data/amber/js/Helios-Inspector.js +1155 -0
- data/amber/js/Helios-KeyBindings.deploy.js +753 -0
- data/amber/js/Helios-KeyBindings.js +1023 -0
- data/amber/js/Helios-Layout.deploy.js +383 -0
- data/amber/js/Helios-Layout.js +523 -0
- data/amber/js/Helios-Workspace.deploy.js +799 -0
- data/amber/js/Helios-Workspace.js +1074 -0
- data/amber/js/IDE.deploy.js +2541 -1490
- data/amber/js/IDE.js +2721 -1660
- data/amber/js/Importer-Exporter.deploy.js +671 -0
- data/amber/js/Importer-Exporter.js +816 -0
- data/amber/js/Kernel-Announcements.deploy.js +137 -20
- data/amber/js/Kernel-Announcements.js +176 -22
- data/amber/js/Kernel-Classes.deploy.js +555 -168
- data/amber/js/Kernel-Classes.js +662 -205
- data/amber/js/Kernel-Collections.deploy.js +1403 -618
- data/amber/js/Kernel-Collections.js +1545 -690
- data/amber/js/Kernel-Exceptions.deploy.js +109 -45
- data/amber/js/Kernel-Exceptions.js +123 -49
- data/amber/js/Kernel-Methods.deploy.js +196 -81
- data/amber/js/Kernel-Methods.js +214 -89
- data/amber/js/Kernel-Objects.deploy.js +1542 -1117
- data/amber/js/Kernel-Objects.js +1593 -1148
- data/amber/js/Kernel-Tests.deploy.js +1725 -772
- data/amber/js/Kernel-Tests.js +2301 -1123
- data/amber/js/Kernel-Transcript.deploy.js +23 -25
- data/amber/js/Kernel-Transcript.js +24 -26
- data/amber/js/SUnit.deploy.js +204 -131
- data/amber/js/SUnit.js +222 -139
- data/amber/js/Spaces.deploy.js +240 -0
- data/amber/js/Spaces.js +326 -0
- data/amber/js/amber.js +26 -7
- data/amber/js/boot.js +65 -47
- data/amber/js/init.js +1 -1
- data/amber/js/lib/CodeMirror/amber.css +21 -21
- data/amber/js/lib/CodeMirror/codemirror.css +119 -13
- data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
- data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
- data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
- data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
- data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
- data/amber/st/Compiler-AST.st +505 -0
- data/amber/st/Compiler-Core.st +835 -0
- data/amber/st/Compiler-Exceptions.st +87 -0
- data/amber/st/Compiler-IR.st +1097 -0
- data/amber/st/Compiler-Inlining.st +650 -0
- data/amber/st/Compiler-Semantic.st +558 -0
- data/amber/st/Compiler-Tests.st +285 -381
- data/amber/st/Compiler.st +725 -2
- data/amber/st/Helios-Announcements.st +104 -0
- data/amber/st/Helios-Browser.st +708 -0
- data/amber/st/Helios-Commands.st +223 -0
- data/amber/st/Helios-Core.st +532 -0
- data/amber/st/Helios-Environments.st +98 -0
- data/amber/st/Helios-Inspector.st +367 -0
- data/amber/st/Helios-KeyBindings.st +337 -0
- data/amber/st/Helios-Layout.st +199 -0
- data/amber/st/Helios-Workspace.st +367 -0
- data/amber/st/IDE.st +75 -53
- data/amber/st/Importer-Exporter.st +386 -0
- data/amber/st/Kernel-Announcements.st +92 -0
- data/amber/st/Kernel-Classes.st +137 -15
- data/amber/st/Kernel-Collections.st +137 -47
- data/amber/st/Kernel-Exceptions.st +14 -0
- data/amber/st/Kernel-Methods.st +9 -1
- data/amber/st/Kernel-Objects.st +29 -5
- data/amber/st/Kernel-Tests.st +545 -199
- data/amber/st/SUnit.st +10 -0
- data/amber/st/Spaces.st +142 -0
- data/lib/resin/app.rb +1 -1
- metadata +86 -31
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -0,0 +1,671 @@
|
|
1
|
+
smalltalk.addPackage('Importer-Exporter', {});
|
2
|
+
smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Importer-Exporter');
|
3
|
+
smalltalk.addMethod(
|
4
|
+
"_nextChunk",
|
5
|
+
smalltalk.method({
|
6
|
+
selector: "nextChunk",
|
7
|
+
fn: function (){
|
8
|
+
var self=this;
|
9
|
+
var $1,$2,$3;
|
10
|
+
var $early={};
|
11
|
+
try {
|
12
|
+
var char_;
|
13
|
+
var result;
|
14
|
+
var chunk;
|
15
|
+
result=smalltalk.send("","_writeStream",[]);
|
16
|
+
smalltalk.send((function(){
|
17
|
+
char_=smalltalk.send(self["@stream"],"_next",[]);
|
18
|
+
char_;
|
19
|
+
return smalltalk.send(char_,"_notNil",[]);
|
20
|
+
}),"_whileTrue_",[(function(){
|
21
|
+
$1=smalltalk.send(char_,"__eq",["!"]);
|
22
|
+
if(smalltalk.assert($1)){
|
23
|
+
$2=smalltalk.send(smalltalk.send(self["@stream"],"_peek",[]),"__eq",["!"]);
|
24
|
+
if(smalltalk.assert($2)){
|
25
|
+
smalltalk.send(self["@stream"],"_next",[]);
|
26
|
+
} else {
|
27
|
+
$3=smalltalk.send(smalltalk.send(result,"_contents",[]),"_trimBoth",[]);
|
28
|
+
throw $early=[$3];
|
29
|
+
};
|
30
|
+
};
|
31
|
+
return smalltalk.send(result,"_nextPut_",[char_]);
|
32
|
+
})]);
|
33
|
+
return nil;
|
34
|
+
}
|
35
|
+
catch(e) {if(e===$early)return e[0]; throw e}
|
36
|
+
}
|
37
|
+
}),
|
38
|
+
smalltalk.ChunkParser);
|
39
|
+
|
40
|
+
smalltalk.addMethod(
|
41
|
+
"_stream_",
|
42
|
+
smalltalk.method({
|
43
|
+
selector: "stream:",
|
44
|
+
fn: function (aStream){
|
45
|
+
var self=this;
|
46
|
+
self["@stream"]=aStream;
|
47
|
+
return self}
|
48
|
+
}),
|
49
|
+
smalltalk.ChunkParser);
|
50
|
+
|
51
|
+
|
52
|
+
smalltalk.addMethod(
|
53
|
+
"_on_",
|
54
|
+
smalltalk.method({
|
55
|
+
selector: "on:",
|
56
|
+
fn: function (aStream){
|
57
|
+
var self=this;
|
58
|
+
var $1;
|
59
|
+
$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_stream_",[aStream]);
|
60
|
+
return $1;
|
61
|
+
}
|
62
|
+
}),
|
63
|
+
smalltalk.ChunkParser.klass);
|
64
|
+
|
65
|
+
|
66
|
+
smalltalk.addClass('Exporter', smalltalk.Object, [], 'Importer-Exporter');
|
67
|
+
smalltalk.addMethod(
|
68
|
+
"_classNameFor_",
|
69
|
+
smalltalk.method({
|
70
|
+
selector: "classNameFor:",
|
71
|
+
fn: function (aClass){
|
72
|
+
var self=this;
|
73
|
+
var $2,$3,$1;
|
74
|
+
$2=smalltalk.send(aClass,"_isMetaclass",[]);
|
75
|
+
if(smalltalk.assert($2)){
|
76
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[".klass"]);
|
77
|
+
} else {
|
78
|
+
$3=smalltalk.send(aClass,"_isNil",[]);
|
79
|
+
if(smalltalk.assert($3)){
|
80
|
+
$1="nil";
|
81
|
+
} else {
|
82
|
+
$1=smalltalk.send(aClass,"_name",[]);
|
83
|
+
};
|
84
|
+
};
|
85
|
+
return $1;
|
86
|
+
}
|
87
|
+
}),
|
88
|
+
smalltalk.Exporter);
|
89
|
+
|
90
|
+
smalltalk.addMethod(
|
91
|
+
"_exportAll",
|
92
|
+
smalltalk.method({
|
93
|
+
selector: "exportAll",
|
94
|
+
fn: function (){
|
95
|
+
var self=this;
|
96
|
+
var $1;
|
97
|
+
$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
|
98
|
+
return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packages",[]),"_do_",[(function(pkg){
|
99
|
+
return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportPackage_",[smalltalk.send(pkg,"_name",[])])]);
|
100
|
+
})]);
|
101
|
+
})]);
|
102
|
+
return $1;
|
103
|
+
}
|
104
|
+
}),
|
105
|
+
smalltalk.Exporter);
|
106
|
+
|
107
|
+
smalltalk.addMethod(
|
108
|
+
"_exportClass_",
|
109
|
+
smalltalk.method({
|
110
|
+
selector: "exportClass:",
|
111
|
+
fn: function (aClass){
|
112
|
+
var self=this;
|
113
|
+
var $1;
|
114
|
+
$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
|
115
|
+
smalltalk.send(self,"_exportDefinitionOf_on_",[aClass,stream]);
|
116
|
+
smalltalk.send(self,"_exportMethodsOf_on_",[aClass,stream]);
|
117
|
+
smalltalk.send(self,"_exportMetaDefinitionOf_on_",[aClass,stream]);
|
118
|
+
return smalltalk.send(self,"_exportMethodsOf_on_",[smalltalk.send(aClass,"_class",[]),stream]);
|
119
|
+
})]);
|
120
|
+
return $1;
|
121
|
+
}
|
122
|
+
}),
|
123
|
+
smalltalk.Exporter);
|
124
|
+
|
125
|
+
smalltalk.addMethod(
|
126
|
+
"_exportDefinitionOf_on_",
|
127
|
+
smalltalk.method({
|
128
|
+
selector: "exportDefinitionOf:on:",
|
129
|
+
fn: function (aClass,aStream){
|
130
|
+
var self=this;
|
131
|
+
var $1,$2,$3,$4;
|
132
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
|
133
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
|
134
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
|
135
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
|
136
|
+
smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
|
137
|
+
return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
|
138
|
+
}),(function(){
|
139
|
+
return smalltalk.send(aStream,"_nextPutAll_",[", "]);
|
140
|
+
})]);
|
141
|
+
smalltalk.send(aStream,"_nextPutAll_",["], '"]);
|
142
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
|
143
|
+
$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
|
144
|
+
$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
|
145
|
+
if(smalltalk.assert($3)){
|
146
|
+
smalltalk.send(aStream,"_lf",[]);
|
147
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk."]);
|
148
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[aClass])]);
|
149
|
+
smalltalk.send(aStream,"_nextPutAll_",[".comment="]);
|
150
|
+
$4=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_asJavascript",[])]);
|
151
|
+
$4;
|
152
|
+
};
|
153
|
+
smalltalk.send(aStream,"_lf",[]);
|
154
|
+
return self}
|
155
|
+
}),
|
156
|
+
smalltalk.Exporter);
|
157
|
+
|
158
|
+
smalltalk.addMethod(
|
159
|
+
"_exportMetaDefinitionOf_on_",
|
160
|
+
smalltalk.method({
|
161
|
+
selector: "exportMetaDefinitionOf:on:",
|
162
|
+
fn: function (aClass,aStream){
|
163
|
+
var self=this;
|
164
|
+
var $1,$2;
|
165
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
|
166
|
+
if(! smalltalk.assert($1)){
|
167
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])])]);
|
168
|
+
$2=smalltalk.send(aStream,"_nextPutAll_",[".iVarNames = ["]);
|
169
|
+
$2;
|
170
|
+
smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
|
171
|
+
return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
|
172
|
+
}),(function(){
|
173
|
+
return smalltalk.send(aStream,"_nextPutAll_",[","]);
|
174
|
+
})]);
|
175
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("];","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])])]);
|
176
|
+
};
|
177
|
+
return self}
|
178
|
+
}),
|
179
|
+
smalltalk.Exporter);
|
180
|
+
|
181
|
+
smalltalk.addMethod(
|
182
|
+
"_exportMethod_of_on_",
|
183
|
+
smalltalk.method({
|
184
|
+
selector: "exportMethod:of:on:",
|
185
|
+
fn: function (aMethod,aClass,aStream){
|
186
|
+
var self=this;
|
187
|
+
var $1,$2;
|
188
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
|
189
|
+
smalltalk.send(aStream,"_lf",[]);
|
190
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
|
191
|
+
smalltalk.send(aStream,"_lf",[]);
|
192
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
|
193
|
+
smalltalk.send(aStream,"_lf",[]);
|
194
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
|
195
|
+
smalltalk.send(aStream,"_lf",[]);
|
196
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("category: '","__comma",[smalltalk.send(aMethod,"_category",[])]),"__comma",["',"])]);
|
197
|
+
smalltalk.send(aStream,"_lf",[]);
|
198
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])]),"__comma",[","])]);
|
199
|
+
smalltalk.send(aStream,"_lf",[]);
|
200
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_asJavascript",[])]),"__comma",[","])]);
|
201
|
+
smalltalk.send(aStream,"_lf",[]);
|
202
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
|
203
|
+
smalltalk.send(aStream,"_lf",[]);
|
204
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("messageSends: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asJavascript",[])]),"__comma",[","])]);
|
205
|
+
smalltalk.send(aStream,"_lf",[]);
|
206
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("referencedClasses: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_referencedClasses",[]),"_asJavascript",[])])]);
|
207
|
+
smalltalk.send(aStream,"_lf",[]);
|
208
|
+
smalltalk.send(aStream,"_nextPutAll_",["}),"]);
|
209
|
+
smalltalk.send(aStream,"_lf",[]);
|
210
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
|
211
|
+
smalltalk.send(aStream,"_nextPutAll_",[");"]);
|
212
|
+
smalltalk.send(aStream,"_lf",[]);
|
213
|
+
$2=smalltalk.send(aStream,"_lf",[]);
|
214
|
+
return self}
|
215
|
+
}),
|
216
|
+
smalltalk.Exporter);
|
217
|
+
|
218
|
+
smalltalk.addMethod(
|
219
|
+
"_exportMethodsOf_on_",
|
220
|
+
smalltalk.method({
|
221
|
+
selector: "exportMethodsOf:on:",
|
222
|
+
fn: function (aClass,aStream){
|
223
|
+
var self=this;
|
224
|
+
var $1;
|
225
|
+
smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
|
226
|
+
return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
|
227
|
+
})]),"_do_",[(function(each){
|
228
|
+
$1=smalltalk.send(smalltalk.send(each,"_category",[]),"_match_",["^\x5c*"]);
|
229
|
+
if(! smalltalk.assert($1)){
|
230
|
+
return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
|
231
|
+
};
|
232
|
+
})]);
|
233
|
+
smalltalk.send(aStream,"_lf",[]);
|
234
|
+
return self}
|
235
|
+
}),
|
236
|
+
smalltalk.Exporter);
|
237
|
+
|
238
|
+
smalltalk.addMethod(
|
239
|
+
"_exportPackage_",
|
240
|
+
smalltalk.method({
|
241
|
+
selector: "exportPackage:",
|
242
|
+
fn: function (packageName){
|
243
|
+
var self=this;
|
244
|
+
var $1;
|
245
|
+
var package;
|
246
|
+
$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
|
247
|
+
package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packageAt_",[packageName]);
|
248
|
+
package;
|
249
|
+
smalltalk.send(self,"_exportPackageDefinitionOf_on_",[package,stream]);
|
250
|
+
smalltalk.send(smalltalk.send(smalltalk.send(package,"_sortedClasses",[]),"_asSet",[]),"_do_",[(function(each){
|
251
|
+
return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportClass_",[each])]);
|
252
|
+
})]);
|
253
|
+
return smalltalk.send(self,"_exportPackageExtensionsOf_on_",[package,stream]);
|
254
|
+
})]);
|
255
|
+
return $1;
|
256
|
+
}
|
257
|
+
}),
|
258
|
+
smalltalk.Exporter);
|
259
|
+
|
260
|
+
smalltalk.addMethod(
|
261
|
+
"_exportPackageDefinitionOf_on_",
|
262
|
+
smalltalk.method({
|
263
|
+
selector: "exportPackageDefinitionOf:on:",
|
264
|
+
fn: function (package,aStream){
|
265
|
+
var self=this;
|
266
|
+
var $1;
|
267
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addPackage("]);
|
268
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["', "]),"__comma",[smalltalk.send(package,"_propertiesAsJSON",[])]),"__comma",[");"])]);
|
269
|
+
smalltalk.send(aStream,"_lf",[]);
|
270
|
+
return self}
|
271
|
+
}),
|
272
|
+
smalltalk.Exporter);
|
273
|
+
|
274
|
+
smalltalk.addMethod(
|
275
|
+
"_exportPackageExtensionsOf_on_",
|
276
|
+
smalltalk.method({
|
277
|
+
selector: "exportPackageExtensionsOf:on:",
|
278
|
+
fn: function (package,aStream){
|
279
|
+
var self=this;
|
280
|
+
var $1;
|
281
|
+
var name;
|
282
|
+
name=smalltalk.send(package,"_name",[]);
|
283
|
+
smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
|
284
|
+
return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
|
285
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
|
286
|
+
return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
|
287
|
+
})]),"_do_",[(function(method){
|
288
|
+
$1=smalltalk.send(smalltalk.send(method,"_category",[]),"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
|
289
|
+
if(smalltalk.assert($1)){
|
290
|
+
return smalltalk.send(self,"_exportMethod_of_on_",[method,aClass,aStream]);
|
291
|
+
};
|
292
|
+
})]);
|
293
|
+
})]);
|
294
|
+
})]);
|
295
|
+
return self}
|
296
|
+
}),
|
297
|
+
smalltalk.Exporter);
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
|
302
|
+
smalltalk.addMethod(
|
303
|
+
"_chunkEscape_",
|
304
|
+
smalltalk.method({
|
305
|
+
selector: "chunkEscape:",
|
306
|
+
fn: function (aString){
|
307
|
+
var self=this;
|
308
|
+
var $1;
|
309
|
+
$1=smalltalk.send(smalltalk.send(aString,"_replace_with_",["!","!!"]),"_trimBoth",[]);
|
310
|
+
return $1;
|
311
|
+
}
|
312
|
+
}),
|
313
|
+
smalltalk.ChunkExporter);
|
314
|
+
|
315
|
+
smalltalk.addMethod(
|
316
|
+
"_classNameFor_",
|
317
|
+
smalltalk.method({
|
318
|
+
selector: "classNameFor:",
|
319
|
+
fn: function (aClass){
|
320
|
+
var self=this;
|
321
|
+
var $2,$3,$1;
|
322
|
+
$2=smalltalk.send(aClass,"_isMetaclass",[]);
|
323
|
+
if(smalltalk.assert($2)){
|
324
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[" class"]);
|
325
|
+
} else {
|
326
|
+
$3=smalltalk.send(aClass,"_isNil",[]);
|
327
|
+
if(smalltalk.assert($3)){
|
328
|
+
$1="nil";
|
329
|
+
} else {
|
330
|
+
$1=smalltalk.send(aClass,"_name",[]);
|
331
|
+
};
|
332
|
+
};
|
333
|
+
return $1;
|
334
|
+
}
|
335
|
+
}),
|
336
|
+
smalltalk.ChunkExporter);
|
337
|
+
|
338
|
+
smalltalk.addMethod(
|
339
|
+
"_exportDefinitionOf_on_",
|
340
|
+
smalltalk.method({
|
341
|
+
selector: "exportDefinitionOf:on:",
|
342
|
+
fn: function (aClass,aStream){
|
343
|
+
var self=this;
|
344
|
+
var $1,$2,$3,$4;
|
345
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])]);
|
346
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(" subclass: #","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
|
347
|
+
smalltalk.send(aStream,"_lf",[]);
|
348
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",["\x09instanceVariableNames: '"]);
|
349
|
+
smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
|
350
|
+
return smalltalk.send(aStream,"_nextPutAll_",[each]);
|
351
|
+
}),(function(){
|
352
|
+
return smalltalk.send(aStream,"_nextPutAll_",[" "]);
|
353
|
+
})]);
|
354
|
+
smalltalk.send(aStream,"_nextPutAll_",["'"]);
|
355
|
+
smalltalk.send(aStream,"_lf",[]);
|
356
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("\x09package: '","__comma",[smalltalk.send(aClass,"_category",[])]),"__comma",["'!"])]);
|
357
|
+
$2=smalltalk.send(aStream,"_lf",[]);
|
358
|
+
$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
|
359
|
+
if(smalltalk.assert($3)){
|
360
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",[" commentStamp!"])]);
|
361
|
+
smalltalk.send(aStream,"_lf",[]);
|
362
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aClass,"_comment",[])]),"__comma",["!"])]);
|
363
|
+
$4=smalltalk.send(aStream,"_lf",[]);
|
364
|
+
$4;
|
365
|
+
};
|
366
|
+
smalltalk.send(aStream,"_lf",[]);
|
367
|
+
return self}
|
368
|
+
}),
|
369
|
+
smalltalk.ChunkExporter);
|
370
|
+
|
371
|
+
smalltalk.addMethod(
|
372
|
+
"_exportMetaDefinitionOf_on_",
|
373
|
+
smalltalk.method({
|
374
|
+
selector: "exportMetaDefinitionOf:on:",
|
375
|
+
fn: function (aClass,aStream){
|
376
|
+
var self=this;
|
377
|
+
var $1,$2,$3;
|
378
|
+
$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
|
379
|
+
if(! smalltalk.assert($1)){
|
380
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])]);
|
381
|
+
$2=smalltalk.send(aStream,"_nextPutAll_",[" instanceVariableNames: '"]);
|
382
|
+
$2;
|
383
|
+
smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
|
384
|
+
return smalltalk.send(aStream,"_nextPutAll_",[each]);
|
385
|
+
}),(function(){
|
386
|
+
return smalltalk.send(aStream,"_nextPutAll_",[" "]);
|
387
|
+
})]);
|
388
|
+
smalltalk.send(aStream,"_nextPutAll_",["'!"]);
|
389
|
+
smalltalk.send(aStream,"_lf",[]);
|
390
|
+
$3=smalltalk.send(aStream,"_lf",[]);
|
391
|
+
$3;
|
392
|
+
};
|
393
|
+
return self}
|
394
|
+
}),
|
395
|
+
smalltalk.ChunkExporter);
|
396
|
+
|
397
|
+
smalltalk.addMethod(
|
398
|
+
"_exportMethod_of_on_",
|
399
|
+
smalltalk.method({
|
400
|
+
selector: "exportMethod:of:on:",
|
401
|
+
fn: function (aMethod,aClass,aStream){
|
402
|
+
var self=this;
|
403
|
+
var $1;
|
404
|
+
smalltalk.send(aStream,"_lf",[]);
|
405
|
+
smalltalk.send(aStream,"_lf",[]);
|
406
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aMethod,"_source",[])])]);
|
407
|
+
smalltalk.send(aStream,"_lf",[]);
|
408
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",["!"]);
|
409
|
+
return self}
|
410
|
+
}),
|
411
|
+
smalltalk.ChunkExporter);
|
412
|
+
|
413
|
+
smalltalk.addMethod(
|
414
|
+
"_exportMethods_category_of_on_",
|
415
|
+
smalltalk.method({
|
416
|
+
selector: "exportMethods:category:of:on:",
|
417
|
+
fn: function (methods,category,aClass,aStream){
|
418
|
+
var self=this;
|
419
|
+
var $1,$2;
|
420
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
|
421
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(" methodsFor: '","__comma",[category]),"__comma",["'!"])]);
|
422
|
+
smalltalk.send(smalltalk.send(methods,"_sorted_",[(function(a,b){
|
423
|
+
return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
|
424
|
+
})]),"_do_",[(function(each){
|
425
|
+
return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
|
426
|
+
})]);
|
427
|
+
smalltalk.send(aStream,"_nextPutAll_",[" !"]);
|
428
|
+
smalltalk.send(aStream,"_lf",[]);
|
429
|
+
$2=smalltalk.send(aStream,"_lf",[]);
|
430
|
+
return self}
|
431
|
+
}),
|
432
|
+
smalltalk.ChunkExporter);
|
433
|
+
|
434
|
+
smalltalk.addMethod(
|
435
|
+
"_exportMethodsOf_on_",
|
436
|
+
smalltalk.method({
|
437
|
+
selector: "exportMethodsOf:on:",
|
438
|
+
fn: function (aClass,aStream){
|
439
|
+
var self=this;
|
440
|
+
var $1;
|
441
|
+
var map;
|
442
|
+
map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
|
443
|
+
smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
|
444
|
+
$1=smalltalk.send(category,"_match_",["^\x5c*"]);
|
445
|
+
if(! smalltalk.assert($1)){
|
446
|
+
return smalltalk.send(map,"_at_put_",[category,methods]);
|
447
|
+
};
|
448
|
+
})]);
|
449
|
+
smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
|
450
|
+
return smalltalk.send(a,"__lt_eq",[b]);
|
451
|
+
})]),"_do_",[(function(category){
|
452
|
+
var methods;
|
453
|
+
methods=smalltalk.send(map,"_at_",[category]);
|
454
|
+
methods;
|
455
|
+
return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
|
456
|
+
})]);
|
457
|
+
return self}
|
458
|
+
}),
|
459
|
+
smalltalk.ChunkExporter);
|
460
|
+
|
461
|
+
smalltalk.addMethod(
|
462
|
+
"_exportPackageDefinitionOf_on_",
|
463
|
+
smalltalk.method({
|
464
|
+
selector: "exportPackageDefinitionOf:on:",
|
465
|
+
fn: function (package,aStream){
|
466
|
+
var self=this;
|
467
|
+
var $1;
|
468
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["' properties: "]),"__comma",[smalltalk.send(smalltalk.send(package,"_properties",[]),"_storeString",[])]),"__comma",["!"])]);
|
469
|
+
$1=smalltalk.send(aStream,"_lf",[]);
|
470
|
+
return self}
|
471
|
+
}),
|
472
|
+
smalltalk.ChunkExporter);
|
473
|
+
|
474
|
+
smalltalk.addMethod(
|
475
|
+
"_exportPackageExtensionsOf_on_",
|
476
|
+
smalltalk.method({
|
477
|
+
selector: "exportPackageExtensionsOf:on:",
|
478
|
+
fn: function (package,aStream){
|
479
|
+
var self=this;
|
480
|
+
var $1;
|
481
|
+
var name;
|
482
|
+
var map;
|
483
|
+
name=smalltalk.send(package,"_name",[]);
|
484
|
+
smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
|
485
|
+
return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
|
486
|
+
map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
|
487
|
+
map;
|
488
|
+
smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
|
489
|
+
$1=smalltalk.send(category,"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
|
490
|
+
if(smalltalk.assert($1)){
|
491
|
+
return smalltalk.send(map,"_at_put_",[category,methods]);
|
492
|
+
};
|
493
|
+
})]);
|
494
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
|
495
|
+
return smalltalk.send(a,"__lt_eq",[b]);
|
496
|
+
})]),"_do_",[(function(category){
|
497
|
+
var methods;
|
498
|
+
methods=smalltalk.send(map,"_at_",[category]);
|
499
|
+
methods;
|
500
|
+
return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
|
501
|
+
})]);
|
502
|
+
})]);
|
503
|
+
})]);
|
504
|
+
return self}
|
505
|
+
}),
|
506
|
+
smalltalk.ChunkExporter);
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
|
511
|
+
smalltalk.addMethod(
|
512
|
+
"_exportDefinitionOf_on_",
|
513
|
+
smalltalk.method({
|
514
|
+
selector: "exportDefinitionOf:on:",
|
515
|
+
fn: function (aClass,aStream){
|
516
|
+
var self=this;
|
517
|
+
var $1,$2;
|
518
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
|
519
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
|
520
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
|
521
|
+
$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
|
522
|
+
smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
|
523
|
+
return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
|
524
|
+
}),(function(){
|
525
|
+
return smalltalk.send(aStream,"_nextPutAll_",[", "]);
|
526
|
+
})]);
|
527
|
+
smalltalk.send(aStream,"_nextPutAll_",["], '"]);
|
528
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
|
529
|
+
$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
|
530
|
+
smalltalk.send(aStream,"_lf",[]);
|
531
|
+
return self}
|
532
|
+
}),
|
533
|
+
smalltalk.StrippedExporter);
|
534
|
+
|
535
|
+
smalltalk.addMethod(
|
536
|
+
"_exportMethod_of_on_",
|
537
|
+
smalltalk.method({
|
538
|
+
selector: "exportMethod:of:on:",
|
539
|
+
fn: function (aMethod,aClass,aStream){
|
540
|
+
var self=this;
|
541
|
+
var $1;
|
542
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
|
543
|
+
smalltalk.send(aStream,"_lf",[]);
|
544
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
|
545
|
+
smalltalk.send(aStream,"_lf",[]);
|
546
|
+
smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
|
547
|
+
smalltalk.send(aStream,"_lf",[]);
|
548
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
|
549
|
+
smalltalk.send(aStream,"_lf",[]);
|
550
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])])]);
|
551
|
+
smalltalk.send(aStream,"_lf",[]);
|
552
|
+
smalltalk.send(aStream,"_nextPutAll_",["}),"]);
|
553
|
+
smalltalk.send(aStream,"_lf",[]);
|
554
|
+
smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
|
555
|
+
smalltalk.send(aStream,"_nextPutAll_",[");"]);
|
556
|
+
smalltalk.send(aStream,"_lf",[]);
|
557
|
+
$1=smalltalk.send(aStream,"_lf",[]);
|
558
|
+
return self}
|
559
|
+
}),
|
560
|
+
smalltalk.StrippedExporter);
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
smalltalk.addClass('Importer', smalltalk.Object, [], 'Importer-Exporter');
|
565
|
+
smalltalk.addMethod(
|
566
|
+
"_import_",
|
567
|
+
smalltalk.method({
|
568
|
+
selector: "import:",
|
569
|
+
fn: function (aStream){
|
570
|
+
var self=this;
|
571
|
+
var $1;
|
572
|
+
var chunk;
|
573
|
+
var result;
|
574
|
+
var parser;
|
575
|
+
var lastEmpty;
|
576
|
+
parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_on_",[aStream]);
|
577
|
+
lastEmpty=false;
|
578
|
+
smalltalk.send((function(){
|
579
|
+
chunk=smalltalk.send(parser,"_nextChunk",[]);
|
580
|
+
chunk;
|
581
|
+
return smalltalk.send(chunk,"_isNil",[]);
|
582
|
+
}),"_whileFalse_",[(function(){
|
583
|
+
$1=smalltalk.send(chunk,"_isEmpty",[]);
|
584
|
+
if(smalltalk.assert($1)){
|
585
|
+
lastEmpty=true;
|
586
|
+
return lastEmpty;
|
587
|
+
} else {
|
588
|
+
result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_evaluateExpression_",[chunk]);
|
589
|
+
result;
|
590
|
+
if(smalltalk.assert(lastEmpty)){
|
591
|
+
lastEmpty=false;
|
592
|
+
lastEmpty;
|
593
|
+
return smalltalk.send(result,"_scanFrom_",[parser]);
|
594
|
+
};
|
595
|
+
};
|
596
|
+
})]);
|
597
|
+
return self}
|
598
|
+
}),
|
599
|
+
smalltalk.Importer);
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
smalltalk.addClass('PackageLoader', smalltalk.Object, [], 'Importer-Exporter');
|
604
|
+
smalltalk.addMethod(
|
605
|
+
"_initializePackageNamed_prefix_",
|
606
|
+
smalltalk.method({
|
607
|
+
selector: "initializePackageNamed:prefix:",
|
608
|
+
fn: function (packageName,aString){
|
609
|
+
var self=this;
|
610
|
+
var $1,$2;
|
611
|
+
smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]),"_classes",[]),"_do_",[(function(each){
|
612
|
+
smalltalk.init(each);
|
613
|
+
;
|
614
|
+
return smalltalk.send(each,"_initialize",[]);
|
615
|
+
})]);
|
616
|
+
$1=smalltalk.send((smalltalk.Package || Package),"_named_",[packageName]);
|
617
|
+
smalltalk.send($1,"_commitPathJs_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js"])]);
|
618
|
+
$2=smalltalk.send($1,"_commitPathSt_",[smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/st"])]);
|
619
|
+
return self}
|
620
|
+
}),
|
621
|
+
smalltalk.PackageLoader);
|
622
|
+
|
623
|
+
smalltalk.addMethod(
|
624
|
+
"_loadPackage_prefix_",
|
625
|
+
smalltalk.method({
|
626
|
+
selector: "loadPackage:prefix:",
|
627
|
+
fn: function (packageName,aString){
|
628
|
+
var self=this;
|
629
|
+
var $1;
|
630
|
+
var url;
|
631
|
+
url=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("/","__comma",[aString]),"__comma",["/js/"]),"__comma",[packageName]),"__comma",[".js"]);
|
632
|
+
smalltalk.send(jQuery,"_ajax_options_",[url,smalltalk.HashedCollection._fromPairs_([smalltalk.send("type","__minus_gt",["GET"]),smalltalk.send("dataType","__minus_gt",["script"]),smalltalk.send("complete","__minus_gt",[(function(jqXHR,textStatus){
|
633
|
+
$1=smalltalk.send(smalltalk.send(jqXHR,"_readyState",[]),"__eq",[(4)]);
|
634
|
+
if(smalltalk.assert($1)){
|
635
|
+
return smalltalk.send(self,"_initializePackageNamed_prefix_",[packageName,aString]);
|
636
|
+
};
|
637
|
+
})]),smalltalk.send("error","__minus_gt",[(function(){
|
638
|
+
return smalltalk.send(window,"_alert_",[smalltalk.send("Could not load package at: ","__comma",[url])]);
|
639
|
+
})])])]);
|
640
|
+
return self}
|
641
|
+
}),
|
642
|
+
smalltalk.PackageLoader);
|
643
|
+
|
644
|
+
smalltalk.addMethod(
|
645
|
+
"_loadPackages_prefix_",
|
646
|
+
smalltalk.method({
|
647
|
+
selector: "loadPackages:prefix:",
|
648
|
+
fn: function (aCollection,aString){
|
649
|
+
var self=this;
|
650
|
+
smalltalk.send(aCollection,"_do_",[(function(each){
|
651
|
+
return smalltalk.send(self,"_loadPackage_prefix_",[each,aString]);
|
652
|
+
})]);
|
653
|
+
return self}
|
654
|
+
}),
|
655
|
+
smalltalk.PackageLoader);
|
656
|
+
|
657
|
+
|
658
|
+
smalltalk.addMethod(
|
659
|
+
"_loadPackages_prefix_",
|
660
|
+
smalltalk.method({
|
661
|
+
selector: "loadPackages:prefix:",
|
662
|
+
fn: function (aCollection,aString){
|
663
|
+
var self=this;
|
664
|
+
var $1;
|
665
|
+
$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_loadPackages_prefix_",[aCollection,aString]);
|
666
|
+
return $1;
|
667
|
+
}
|
668
|
+
}),
|
669
|
+
smalltalk.PackageLoader.klass);
|
670
|
+
|
671
|
+
|