1
0

Importer-Exporter.deploy.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Importer-Exporter');
  3. smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Importer-Exporter');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "nextChunk",
  7. fn: function (){
  8. var self=this;
  9. var char,result,chunk;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1,$2,$3;
  12. var $early={};
  13. try {
  14. result=""._writeStream();
  15. _st((function(){
  16. return smalltalk.withContext(function($ctx2) {
  17. char=_st(self["@stream"])._next();
  18. char;
  19. return _st(char)._notNil();
  20. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  21. return smalltalk.withContext(function($ctx2) {
  22. $1=_st(char).__eq("!");
  23. if(smalltalk.assert($1)){
  24. $2=_st(_st(self["@stream"])._peek()).__eq("!");
  25. if(smalltalk.assert($2)){
  26. _st(self["@stream"])._next();
  27. } else {
  28. $3=_st(_st(result)._contents())._trimBoth();
  29. throw $early=[$3];
  30. };
  31. };
  32. return _st(result)._nextPut_(char);
  33. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  34. return nil;
  35. }
  36. catch(e) {if(e===$early)return e[0]; throw e}
  37. }, function($ctx1) {$ctx1.fill(self,"nextChunk",{char:char,result:result,chunk:chunk},smalltalk.ChunkParser)})},
  38. messageSends: ["writeStream", "whileTrue:", "ifTrue:", "ifTrue:ifFalse:", "next", "trimBoth", "contents", "=", "peek", "nextPut:", "notNil"]}),
  39. smalltalk.ChunkParser);
  40. smalltalk.addMethod(
  41. smalltalk.method({
  42. selector: "stream:",
  43. fn: function (aStream){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. self["@stream"]=aStream;
  47. return self}, function($ctx1) {$ctx1.fill(self,"stream:",{aStream:aStream},smalltalk.ChunkParser)})},
  48. messageSends: []}),
  49. smalltalk.ChunkParser);
  50. smalltalk.addMethod(
  51. smalltalk.method({
  52. selector: "on:",
  53. fn: function (aStream){
  54. var self=this;
  55. return smalltalk.withContext(function($ctx1) {
  56. var $1;
  57. $1=_st(self._new())._stream_(aStream);
  58. return $1;
  59. }, function($ctx1) {$ctx1.fill(self,"on:",{aStream:aStream},smalltalk.ChunkParser.klass)})},
  60. messageSends: ["stream:", "new"]}),
  61. smalltalk.ChunkParser.klass);
  62. smalltalk.addClass('Exporter', smalltalk.Object, [], 'Importer-Exporter');
  63. smalltalk.addMethod(
  64. smalltalk.method({
  65. selector: "classNameFor:",
  66. fn: function (aClass){
  67. var self=this;
  68. return smalltalk.withContext(function($ctx1) {
  69. var $2,$3,$1;
  70. $2=_st(aClass)._isMetaclass();
  71. if(smalltalk.assert($2)){
  72. $1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
  73. } else {
  74. $3=_st(aClass)._isNil();
  75. if(smalltalk.assert($3)){
  76. $1="nil";
  77. } else {
  78. $1=_st(aClass)._name();
  79. };
  80. };
  81. return $1;
  82. }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.Exporter)})},
  83. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"]}),
  84. smalltalk.Exporter);
  85. smalltalk.addMethod(
  86. smalltalk.method({
  87. selector: "exportAll",
  88. fn: function (){
  89. var self=this;
  90. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  91. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  92. return smalltalk.withContext(function($ctx1) {
  93. var $1;
  94. $1=_st($String())._streamContents_((function(stream){
  95. return smalltalk.withContext(function($ctx2) {
  96. return _st(_st(_st($Smalltalk())._current())._packages())._do_((function(pkg){
  97. return smalltalk.withContext(function($ctx3) {
  98. return self._exportPackage_on_(_st(pkg)._name(),stream);
  99. }, function($ctx3) {$ctx3.fillBlock({pkg:pkg},$ctx2)})}));
  100. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  101. return $1;
  102. }, function($ctx1) {$ctx1.fill(self,"exportAll",{},smalltalk.Exporter)})},
  103. messageSends: ["streamContents:", "do:", "exportPackage:on:", "name", "packages", "current"]}),
  104. smalltalk.Exporter);
  105. smalltalk.addMethod(
  106. smalltalk.method({
  107. selector: "exportClass:on:",
  108. fn: function (aClass,aStream){
  109. var self=this;
  110. return smalltalk.withContext(function($ctx1) {
  111. self._exportDefinitionOf_on_(aClass,aStream);
  112. self._exportMethodsOf_on_(aClass,aStream);
  113. self._exportMetaDefinitionOf_on_(aClass,aStream);
  114. self._exportMethodsOf_on_(_st(aClass)._class(),aStream);
  115. return self}, function($ctx1) {$ctx1.fill(self,"exportClass:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
  116. messageSends: ["exportDefinitionOf:on:", "exportMethodsOf:on:", "exportMetaDefinitionOf:on:", "class"]}),
  117. smalltalk.Exporter);
  118. smalltalk.addMethod(
  119. smalltalk.method({
  120. selector: "exportDefinitionOf:on:",
  121. fn: function (aClass,aStream){
  122. var self=this;
  123. return smalltalk.withContext(function($ctx1) {
  124. var $1,$2,$3,$4,$5,$6,$7;
  125. $1=aStream;
  126. _st($1)._nextPutAll_("smalltalk.addClass(");
  127. _st($1)._nextPutAll_(_st("'".__comma(self._classNameFor_(aClass))).__comma("', "));
  128. _st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._superclass())));
  129. $2=_st($1)._nextPutAll_(", [");
  130. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  131. return smalltalk.withContext(function($ctx2) {
  132. return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
  133. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  134. return smalltalk.withContext(function($ctx2) {
  135. return _st(aStream)._nextPutAll_(", ");
  136. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  137. $3=aStream;
  138. _st($3)._nextPutAll_("], '");
  139. _st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
  140. $4=_st($3)._nextPutAll_(");");
  141. $5=_st(_st(aClass)._comment())._notEmpty();
  142. if(smalltalk.assert($5)){
  143. $6=aStream;
  144. _st($6)._lf();
  145. _st($6)._nextPutAll_("smalltalk.");
  146. _st($6)._nextPutAll_(self._classNameFor_(aClass));
  147. _st($6)._nextPutAll_(".comment=");
  148. _st($6)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
  149. $7=_st($6)._nextPutAll_(";");
  150. $7;
  151. };
  152. _st(aStream)._lf();
  153. return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
  154. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "lf", "asJavascript", "comment", "notEmpty"]}),
  155. smalltalk.Exporter);
  156. smalltalk.addMethod(
  157. smalltalk.method({
  158. selector: "exportMetaDefinitionOf:on:",
  159. fn: function (aClass,aStream){
  160. var self=this;
  161. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  162. return smalltalk.withContext(function($ctx1) {
  163. var $1,$2,$3;
  164. $1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
  165. if(! smalltalk.assert($1)){
  166. $2=aStream;
  167. _st($2)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._class())));
  168. $3=_st($2)._nextPutAll_(".iVarNames = [");
  169. $3;
  170. _st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
  171. return smalltalk.withContext(function($ctx2) {
  172. return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
  173. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  174. return smalltalk.withContext(function($ctx2) {
  175. return _st(aStream)._nextPutAll_(",");
  176. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  177. _st(aStream)._nextPutAll_("];".__comma(_st($String())._lf()));
  178. };
  179. return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
  180. messageSends: ["ifFalse:", "nextPutAll:", ",", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"]}),
  181. smalltalk.Exporter);
  182. smalltalk.addMethod(
  183. smalltalk.method({
  184. selector: "exportMethod:on:",
  185. fn: function (aMethod,aStream){
  186. var self=this;
  187. return smalltalk.withContext(function($ctx1) {
  188. var $1,$2,$3,$4;
  189. $1=aStream;
  190. _st($1)._nextPutAll_("smalltalk.addMethod(");
  191. _st($1)._lf();
  192. _st($1)._nextPutAll_("smalltalk.method({");
  193. _st($1)._lf();
  194. _st($1)._nextPutAll_(_st("selector: ".__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
  195. _st($1)._lf();
  196. _st($1)._nextPutAll_(_st("category: '".__comma(_st(aMethod)._category())).__comma("',"));
  197. _st($1)._lf();
  198. _st($1)._nextPutAll_(_st("fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
  199. _st($1)._lf();
  200. _st($1)._nextPutAll_(_st("args: ".__comma(_st(_st(aMethod)._arguments())._asJavascript())).__comma(","));
  201. _st($1)._lf();
  202. _st($1)._nextPutAll_(_st("source: ".__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
  203. _st($1)._lf();
  204. _st($1)._nextPutAll_(_st("messageSends: ".__comma(_st(_st(aMethod)._messageSends())._asJavascript())).__comma(","));
  205. _st($1)._lf();
  206. $2=_st($1)._nextPutAll_("referencedClasses: ".__comma(_st(_st(aMethod)._referencedClasses())._asJavascript()));
  207. $3=aStream;
  208. _st($3)._lf();
  209. _st($3)._nextPutAll_("}),");
  210. _st($3)._lf();
  211. _st($3)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
  212. _st($3)._nextPutAll_(");");
  213. _st($3)._lf();
  214. $4=_st($3)._lf();
  215. return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.Exporter)})},
  216. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "selector", "category", "compiledSource", "fn", "arguments", "source", "messageSends", "referencedClasses", "classNameFor:", "methodClass"]}),
  217. smalltalk.Exporter);
  218. smalltalk.addMethod(
  219. smalltalk.method({
  220. selector: "exportMethodsOf:on:",
  221. fn: function (aClass,aStream){
  222. var self=this;
  223. return smalltalk.withContext(function($ctx1) {
  224. var $1;
  225. _st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
  226. return smalltalk.withContext(function($ctx2) {
  227. return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  228. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  229. return smalltalk.withContext(function($ctx2) {
  230. $1=_st(_st(each)._category())._match_("^\x5c*");
  231. if(! smalltalk.assert($1)){
  232. return self._exportMethod_on_(each,aStream);
  233. };
  234. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  235. _st(aStream)._lf();
  236. return self}, function($ctx1) {$ctx1.fill(self,"exportMethodsOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
  237. messageSends: ["do:", "ifFalse:", "exportMethod:on:", "match:", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "lf"]}),
  238. smalltalk.Exporter);
  239. smalltalk.addMethod(
  240. smalltalk.method({
  241. selector: "exportPackage:on:",
  242. fn: function (packageName,stream){
  243. var self=this;
  244. var package_;
  245. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  246. return smalltalk.withContext(function($ctx1) {
  247. self._exportPackagePrologueOn_(stream);
  248. _st((function(){
  249. return smalltalk.withContext(function($ctx2) {
  250. package_=_st(_st($Smalltalk())._current())._packageAt_(packageName);
  251. package_;
  252. self._exportPackageDefinitionOf_on_(package_,stream);
  253. _st(_st(_st(package_)._sortedClasses())._asSet())._do_((function(each){
  254. return smalltalk.withContext(function($ctx3) {
  255. return self._exportClass_on_(each,stream);
  256. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
  257. return self._exportPackageExtensionsOf_on_(package_,stream);
  258. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
  259. return smalltalk.withContext(function($ctx2) {
  260. return self._exportPackageEpilogueOn_(stream);
  261. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  262. return self}, function($ctx1) {$ctx1.fill(self,"exportPackage:on:",{packageName:packageName,stream:stream,package_:package_},smalltalk.Exporter)})},
  263. messageSends: ["exportPackagePrologueOn:", "ensure:", "exportPackageEpilogueOn:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "exportClass:on:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"]}),
  264. smalltalk.Exporter);
  265. smalltalk.addMethod(
  266. smalltalk.method({
  267. selector: "exportPackageDefinitionOf:on:",
  268. fn: function (package_,aStream){
  269. var self=this;
  270. return smalltalk.withContext(function($ctx1) {
  271. var $1,$2;
  272. $1=aStream;
  273. _st($1)._nextPutAll_("smalltalk.addPackage(");
  274. _st($1)._nextPutAll_(_st("'".__comma(_st(package_)._name())).__comma("');"));
  275. $2=_st($1)._lf();
  276. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream},smalltalk.Exporter)})},
  277. messageSends: ["nextPutAll:", ",", "name", "lf"]}),
  278. smalltalk.Exporter);
  279. smalltalk.addMethod(
  280. smalltalk.method({
  281. selector: "exportPackageEpilogueOn:",
  282. fn: function (aStream){
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) {
  285. var $1,$2;
  286. $1=aStream;
  287. _st($1)._nextPutAll_("})(global_smalltalk,global_nil,global__st);");
  288. $2=_st($1)._lf();
  289. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.Exporter)})},
  290. messageSends: ["nextPutAll:", "lf"]}),
  291. smalltalk.Exporter);
  292. smalltalk.addMethod(
  293. smalltalk.method({
  294. selector: "exportPackageExtensionsOf:on:",
  295. fn: function (package_,aStream){
  296. var self=this;
  297. var name;
  298. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  299. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  300. return smalltalk.withContext(function($ctx1) {
  301. var $1;
  302. name=_st(package_)._name();
  303. _st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
  304. return smalltalk.withContext(function($ctx2) {
  305. return _st([each,_st(each)._class()])._do_((function(aClass){
  306. return smalltalk.withContext(function($ctx3) {
  307. return _st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
  308. return smalltalk.withContext(function($ctx4) {
  309. return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  310. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3)})})))._do_((function(method){
  311. return smalltalk.withContext(function($ctx4) {
  312. $1=_st(_st(method)._category())._match_("^\x5c*".__comma(name));
  313. if(smalltalk.assert($1)){
  314. return self._exportMethod_on_(method,aStream);
  315. };
  316. }, function($ctx4) {$ctx4.fillBlock({method:method},$ctx3)})}));
  317. }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2)})}));
  318. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  319. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name},smalltalk.Exporter)})},
  320. messageSends: ["name", "do:", "ifTrue:", "exportMethod:on:", "match:", ",", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "class", "sortedClasses:", "classes", "current"]}),
  321. smalltalk.Exporter);
  322. smalltalk.addMethod(
  323. smalltalk.method({
  324. selector: "exportPackagePrologueOn:",
  325. fn: function (aStream){
  326. var self=this;
  327. return smalltalk.withContext(function($ctx1) {
  328. var $1,$2;
  329. $1=aStream;
  330. _st($1)._nextPutAll_("(function(smalltalk,nil,_st){");
  331. $2=_st($1)._lf();
  332. return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.Exporter)})},
  333. messageSends: ["nextPutAll:", "lf"]}),
  334. smalltalk.Exporter);
  335. smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
  336. smalltalk.addMethod(
  337. smalltalk.method({
  338. selector: "chunkEscape:",
  339. fn: function (aString){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) {
  342. var $1;
  343. $1=_st(_st(aString)._replace_with_("!","!!"))._trimBoth();
  344. return $1;
  345. }, function($ctx1) {$ctx1.fill(self,"chunkEscape:",{aString:aString},smalltalk.ChunkExporter)})},
  346. messageSends: ["trimBoth", "replace:with:"]}),
  347. smalltalk.ChunkExporter);
  348. smalltalk.addMethod(
  349. smalltalk.method({
  350. selector: "classNameFor:",
  351. fn: function (aClass){
  352. var self=this;
  353. return smalltalk.withContext(function($ctx1) {
  354. var $2,$3,$1;
  355. $2=_st(aClass)._isMetaclass();
  356. if(smalltalk.assert($2)){
  357. $1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
  358. } else {
  359. $3=_st(aClass)._isNil();
  360. if(smalltalk.assert($3)){
  361. $1="nil";
  362. } else {
  363. $1=_st(aClass)._name();
  364. };
  365. };
  366. return $1;
  367. }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.ChunkExporter)})},
  368. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"]}),
  369. smalltalk.ChunkExporter);
  370. smalltalk.addMethod(
  371. smalltalk.method({
  372. selector: "exportCategory:on:",
  373. fn: function (category,aStream){
  374. var self=this;
  375. return smalltalk.withContext(function($ctx1) {
  376. var $1,$2,$3,$4;
  377. $1=aStream;
  378. _st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(category)._at_("class"))));
  379. $2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(category)._at_("name"))).__comma("'!"));
  380. _st(_st(_st(category)._at_("methods"))._sorted_((function(a,b){
  381. return smalltalk.withContext(function($ctx2) {
  382. return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  383. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  384. return smalltalk.withContext(function($ctx2) {
  385. return self._exportMethod_on_(each,aStream);
  386. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  387. $3=aStream;
  388. _st($3)._nextPutAll_(" !");
  389. _st($3)._lf();
  390. $4=_st($3)._lf();
  391. return self}, function($ctx1) {$ctx1.fill(self,"exportCategory:on:",{category:category,aStream:aStream},smalltalk.ChunkExporter)})},
  392. messageSends: ["nextPutAll:", ",", "classNameFor:", "at:", "do:", "exportMethod:on:", "sorted:", "<=", "selector", "lf"]}),
  393. smalltalk.ChunkExporter);
  394. smalltalk.addMethod(
  395. smalltalk.method({
  396. selector: "exportDefinitionOf:on:",
  397. fn: function (aClass,aStream){
  398. var self=this;
  399. return smalltalk.withContext(function($ctx1) {
  400. var $1,$2,$3,$4,$5,$6,$7;
  401. $1=aStream;
  402. _st($1)._nextPutAll_(self._classNameFor_(_st(aClass)._superclass()));
  403. _st($1)._nextPutAll_(" subclass: #".__comma(self._classNameFor_(aClass)));
  404. _st($1)._lf();
  405. _st($1)._tab();
  406. $2=_st($1)._nextPutAll_("instanceVariableNames: '");
  407. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  408. return smalltalk.withContext(function($ctx2) {
  409. return _st(aStream)._nextPutAll_(each);
  410. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  411. return smalltalk.withContext(function($ctx2) {
  412. return _st(aStream)._nextPutAll_(" ");
  413. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  414. $3=aStream;
  415. _st($3)._nextPutAll_("'");
  416. _st($3)._lf();
  417. _st($3)._tab();
  418. _st($3)._nextPutAll_(_st("package: '".__comma(_st(aClass)._category())).__comma("'!"));
  419. $4=_st($3)._lf();
  420. $5=_st(_st(aClass)._comment())._notEmpty();
  421. if(smalltalk.assert($5)){
  422. $6=aStream;
  423. _st($6)._nextPutAll_(_st("!".__comma(self._classNameFor_(aClass))).__comma(" commentStamp!"));
  424. _st($6)._lf();
  425. _st($6)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
  426. $7=_st($6)._lf();
  427. $7;
  428. };
  429. _st(aStream)._lf();
  430. return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
  431. messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "chunkEscape:", "comment", "notEmpty"]}),
  432. smalltalk.ChunkExporter);
  433. smalltalk.addMethod(
  434. smalltalk.method({
  435. selector: "exportMetaDefinitionOf:on:",
  436. fn: function (aClass,aStream){
  437. var self=this;
  438. return smalltalk.withContext(function($ctx1) {
  439. var $1,$2,$3,$4,$5;
  440. $1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
  441. if(! smalltalk.assert($1)){
  442. $2=aStream;
  443. _st($2)._nextPutAll_(self._classNameFor_(_st(aClass)._class()));
  444. $3=_st($2)._nextPutAll_(" instanceVariableNames: '");
  445. $3;
  446. _st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
  447. return smalltalk.withContext(function($ctx2) {
  448. return _st(aStream)._nextPutAll_(each);
  449. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  450. return smalltalk.withContext(function($ctx2) {
  451. return _st(aStream)._nextPutAll_(" ");
  452. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  453. $4=aStream;
  454. _st($4)._nextPutAll_("'!");
  455. _st($4)._lf();
  456. $5=_st($4)._lf();
  457. $5;
  458. };
  459. return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
  460. messageSends: ["ifFalse:", "nextPutAll:", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"]}),
  461. smalltalk.ChunkExporter);
  462. smalltalk.addMethod(
  463. smalltalk.method({
  464. selector: "exportMethod:on:",
  465. fn: function (aMethod,aStream){
  466. var self=this;
  467. return smalltalk.withContext(function($ctx1) {
  468. var $1,$2;
  469. $1=aStream;
  470. _st($1)._lf();
  471. _st($1)._lf();
  472. _st($1)._nextPutAll_(self._chunkEscape_(_st(aMethod)._source()));
  473. _st($1)._lf();
  474. $2=_st($1)._nextPutAll_("!");
  475. return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.ChunkExporter)})},
  476. messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"]}),
  477. smalltalk.ChunkExporter);
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "exportMethodsOf:on:",
  481. fn: function (aClass,aStream){
  482. var self=this;
  483. var map;
  484. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  485. return smalltalk.withContext(function($ctx1) {
  486. var $1;
  487. map=_st($Dictionary())._new();
  488. _st(aClass)._protocolsDo_((function(category,methods){
  489. return smalltalk.withContext(function($ctx2) {
  490. $1=_st(category)._match_("^\x5c*");
  491. if(! smalltalk.assert($1)){
  492. return _st(map)._at_put_(category,methods);
  493. };
  494. }, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})}));
  495. _st(_st(_st(map)._keys())._sorted_((function(a,b){
  496. return smalltalk.withContext(function($ctx2) {
  497. return _st(a).__lt_eq(b);
  498. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(category){
  499. var methods;
  500. return smalltalk.withContext(function($ctx2) {
  501. methods=_st(map)._at_(category);
  502. methods;
  503. return self._exportCategory_on_(smalltalk.HashedCollection._from_(["methods".__minus_gt(methods),"name".__minus_gt(category),"class".__minus_gt(aClass)]),aStream);
  504. }, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})}));
  505. return self}, function($ctx1) {$ctx1.fill(self,"exportMethodsOf:on:",{aClass:aClass,aStream:aStream,map:map},smalltalk.ChunkExporter)})},
  506. messageSends: ["new", "protocolsDo:", "ifFalse:", "at:put:", "match:", "do:", "at:", "exportCategory:on:", "->", "sorted:", "<=", "keys"]}),
  507. smalltalk.ChunkExporter);
  508. smalltalk.addMethod(
  509. smalltalk.method({
  510. selector: "exportPackageDefinitionOf:on:",
  511. fn: function (package_,aStream){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. var $1,$2;
  515. $1=aStream;
  516. _st($1)._nextPutAll_(_st("Smalltalk current createPackage: '".__comma(_st(package_)._name())).__comma("'!"));
  517. $2=_st($1)._lf();
  518. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream},smalltalk.ChunkExporter)})},
  519. messageSends: ["nextPutAll:", ",", "name", "lf"]}),
  520. smalltalk.ChunkExporter);
  521. smalltalk.addMethod(
  522. smalltalk.method({
  523. selector: "exportPackageEpilogueOn:",
  524. fn: function (aStream){
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) {
  527. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
  528. messageSends: []}),
  529. smalltalk.ChunkExporter);
  530. smalltalk.addMethod(
  531. smalltalk.method({
  532. selector: "exportPackageExtensionsOf:on:",
  533. fn: function (package_,aStream){
  534. var self=this;
  535. var name,map;
  536. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  537. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  538. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  539. return smalltalk.withContext(function($ctx1) {
  540. var $1;
  541. name=_st(package_)._name();
  542. _st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
  543. return smalltalk.withContext(function($ctx2) {
  544. return _st([each,_st(each)._class()])._do_((function(aClass){
  545. return smalltalk.withContext(function($ctx3) {
  546. map=_st($Dictionary())._new();
  547. map;
  548. _st(aClass)._protocolsDo_((function(category,methods){
  549. return smalltalk.withContext(function($ctx4) {
  550. $1=_st(category)._match_("^\x5c*".__comma(name));
  551. if(smalltalk.assert($1)){
  552. return _st(map)._at_put_(category,methods);
  553. };
  554. }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3)})}));
  555. return _st(_st(_st(map)._keys())._sorted_((function(a,b){
  556. return smalltalk.withContext(function($ctx4) {
  557. return _st(a).__lt_eq(b);
  558. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3)})})))._do_((function(category){
  559. var methods;
  560. return smalltalk.withContext(function($ctx4) {
  561. methods=_st(map)._at_(category);
  562. methods;
  563. return self._exportCategory_on_(smalltalk.HashedCollection._from_(["methods".__minus_gt(methods),"name".__minus_gt(category),"class".__minus_gt(aClass)]),aStream);
  564. }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3)})}));
  565. }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2)})}));
  566. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  567. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name,map:map},smalltalk.ChunkExporter)})},
  568. messageSends: ["name", "do:", "new", "protocolsDo:", "ifTrue:", "at:put:", "match:", ",", "at:", "exportCategory:on:", "->", "sorted:", "<=", "keys", "class", "sortedClasses:", "classes", "current"]}),
  569. smalltalk.ChunkExporter);
  570. smalltalk.addMethod(
  571. smalltalk.method({
  572. selector: "exportPackagePrologueOn:",
  573. fn: function (aStream){
  574. var self=this;
  575. return smalltalk.withContext(function($ctx1) {
  576. return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOn:",{aStream:aStream},smalltalk.ChunkExporter)})},
  577. messageSends: []}),
  578. smalltalk.ChunkExporter);
  579. smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
  580. smalltalk.addMethod(
  581. smalltalk.method({
  582. selector: "exportDefinitionOf:on:",
  583. fn: function (aClass,aStream){
  584. var self=this;
  585. return smalltalk.withContext(function($ctx1) {
  586. var $1,$2,$3,$4;
  587. $1=aStream;
  588. _st($1)._nextPutAll_("smalltalk.addClass(");
  589. _st($1)._nextPutAll_(_st("'".__comma(self._classNameFor_(aClass))).__comma("', "));
  590. _st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._superclass())));
  591. $2=_st($1)._nextPutAll_(", [");
  592. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  593. return smalltalk.withContext(function($ctx2) {
  594. return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
  595. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  596. return smalltalk.withContext(function($ctx2) {
  597. return _st(aStream)._nextPutAll_(", ");
  598. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  599. $3=aStream;
  600. _st($3)._nextPutAll_("], '");
  601. _st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
  602. $4=_st($3)._nextPutAll_(");");
  603. _st(aStream)._lf();
  604. return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.StrippedExporter)})},
  605. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"]}),
  606. smalltalk.StrippedExporter);
  607. smalltalk.addMethod(
  608. smalltalk.method({
  609. selector: "exportMethod:on:",
  610. fn: function (aMethod,aStream){
  611. var self=this;
  612. return smalltalk.withContext(function($ctx1) {
  613. var $1,$2;
  614. $1=aStream;
  615. _st($1)._nextPutAll_("smalltalk.addMethod(");
  616. _st($1)._lf();
  617. _st($1)._nextPutAll_("smalltalk.method({");
  618. _st($1)._lf();
  619. _st($1)._nextPutAll_(_st("selector: ".__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
  620. _st($1)._lf();
  621. _st($1)._nextPutAll_(_st("fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
  622. _st($1)._lf();
  623. _st($1)._nextPutAll_("messageSends: ".__comma(_st(_st(aMethod)._messageSends())._asJavascript()));
  624. _st($1)._nextPutAll_("}),");
  625. _st($1)._lf();
  626. _st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
  627. _st($1)._nextPutAll_(");");
  628. _st($1)._lf();
  629. $2=_st($1)._lf();
  630. return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.StrippedExporter)})},
  631. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "selector", "compiledSource", "fn", "messageSends", "classNameFor:", "methodClass"]}),
  632. smalltalk.StrippedExporter);
  633. smalltalk.addClass('Importer', smalltalk.Object, [], 'Importer-Exporter');
  634. smalltalk.addMethod(
  635. smalltalk.method({
  636. selector: "import:",
  637. fn: function (aStream){
  638. var self=this;
  639. var chunk,result,parser,lastEmpty;
  640. function $ChunkParser(){return smalltalk.ChunkParser||(typeof ChunkParser=="undefined"?nil:ChunkParser)}
  641. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  642. return smalltalk.withContext(function($ctx1) {
  643. var $1,$2;
  644. parser=_st($ChunkParser())._on_(aStream);
  645. lastEmpty=false;
  646. _st((function(){
  647. return smalltalk.withContext(function($ctx2) {
  648. chunk=_st(parser)._nextChunk();
  649. chunk;
  650. return _st(chunk)._isNil();
  651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  652. return smalltalk.withContext(function($ctx2) {
  653. $1=_st(chunk)._isEmpty();
  654. if(smalltalk.assert($1)){
  655. lastEmpty=true;
  656. return lastEmpty;
  657. } else {
  658. result=_st(_st($Compiler())._new())._evaluateExpression_(chunk);
  659. result;
  660. $2=lastEmpty;
  661. if(smalltalk.assert($2)){
  662. lastEmpty=false;
  663. lastEmpty;
  664. return _st(result)._scanFrom_(parser);
  665. };
  666. };
  667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  668. return self}, function($ctx1) {$ctx1.fill(self,"import:",{aStream:aStream,chunk:chunk,result:result,parser:parser,lastEmpty:lastEmpty},smalltalk.Importer)})},
  669. messageSends: ["on:", "whileFalse:", "ifTrue:ifFalse:", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "isEmpty", "nextChunk", "isNil"]}),
  670. smalltalk.Importer);
  671. smalltalk.addClass('PackageHandler', smalltalk.Object, [], 'Importer-Exporter');
  672. smalltalk.addMethod(
  673. smalltalk.method({
  674. selector: "ajaxPutAt:data:",
  675. fn: function (aURL,aString){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) {
  678. _st(jQuery)._ajax_options_(aURL,smalltalk.HashedCollection._from_(["type".__minus_gt("PUT"),"data".__minus_gt(aString),"contentType".__minus_gt("text/plain;charset=UTF-8"),"error".__minus_gt((function(xhr){
  679. return smalltalk.withContext(function($ctx2) {
  680. return self._error_(_st(_st(_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
  681. }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
  682. return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
  683. messageSends: ["ajax:options:", "->", "error:", ",", "responseText"]}),
  684. smalltalk.PackageHandler);
  685. smalltalk.addMethod(
  686. smalltalk.method({
  687. selector: "commit:",
  688. fn: function (aPackage){
  689. var self=this;
  690. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  691. function $Exporter(){return smalltalk.Exporter||(typeof Exporter=="undefined"?nil:Exporter)}
  692. function $StrippedExporter(){return smalltalk.StrippedExporter||(typeof StrippedExporter=="undefined"?nil:StrippedExporter)}
  693. function $ChunkExporter(){return smalltalk.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}
  694. return smalltalk.withContext(function($ctx1) {
  695. _st([_st($Exporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".js")),_st($StrippedExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".deploy.js")),_st($ChunkExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathSt()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".st"))])._do_displayingProgress_((function(commitStrategy){
  696. var fileContents;
  697. return smalltalk.withContext(function($ctx2) {
  698. fileContents=_st($String())._streamContents_((function(stream){
  699. return smalltalk.withContext(function($ctx3) {
  700. return _st(_st(_st(commitStrategy)._key())._new())._exportPackage_on_(_st(aPackage)._name(),stream);
  701. }, function($ctx3) {$ctx3.fillBlock({stream:stream},$ctx2)})}));
  702. fileContents;
  703. return self._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
  704. }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}),"Committing package ".__comma(_st(aPackage)._name()));
  705. return self}, function($ctx1) {$ctx1.fill(self,"commit:",{aPackage:aPackage},smalltalk.PackageHandler)})},
  706. messageSends: ["do:displayingProgress:", "streamContents:", "exportPackage:on:", "name", "new", "key", "ajaxPutAt:data:", "value", ",", "->", "commitPathJs", "commitPathSt"]}),
  707. smalltalk.PackageHandler);
  708. smalltalk.addMethod(
  709. smalltalk.method({
  710. selector: "loadPackage:prefix:",
  711. fn: function (packageName,aString){
  712. var self=this;
  713. var url;
  714. return smalltalk.withContext(function($ctx1) {
  715. var $1;
  716. url=_st(_st(_st("/".__comma(aString)).__comma("/js/")).__comma(packageName)).__comma(".js");
  717. _st(jQuery)._ajax_options_(url,smalltalk.HashedCollection._from_(["type".__minus_gt("GET"),"dataType".__minus_gt("script"),"complete".__minus_gt((function(jqXHR,textStatus){
  718. return smalltalk.withContext(function($ctx2) {
  719. $1=_st(_st(jqXHR)._readyState()).__eq((4));
  720. if(smalltalk.assert($1)){
  721. return self._setupPackageNamed_prefix_(packageName,aString);
  722. };
  723. }, function($ctx2) {$ctx2.fillBlock({jqXHR:jqXHR,textStatus:textStatus},$ctx1)})})),"error".__minus_gt((function(){
  724. return smalltalk.withContext(function($ctx2) {
  725. return _st(window)._alert_("Could not load package at: ".__comma(url));
  726. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]));
  727. return self}, function($ctx1) {$ctx1.fill(self,"loadPackage:prefix:",{packageName:packageName,aString:aString,url:url},smalltalk.PackageHandler)})},
  728. messageSends: [",", "ajax:options:", "->", "ifTrue:", "setupPackageNamed:prefix:", "=", "readyState", "alert:"]}),
  729. smalltalk.PackageHandler);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "loadPackages:prefix:",
  733. fn: function (aCollection,aString){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) {
  736. _st(aCollection)._do_((function(each){
  737. return smalltalk.withContext(function($ctx2) {
  738. return self._loadPackage_prefix_(each,aString);
  739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  740. return self}, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString},smalltalk.PackageHandler)})},
  741. messageSends: ["do:", "loadPackage:prefix:"]}),
  742. smalltalk.PackageHandler);
  743. smalltalk.addMethod(
  744. smalltalk.method({
  745. selector: "setupPackageNamed:prefix:",
  746. fn: function (packageName,aString){
  747. var self=this;
  748. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  749. return smalltalk.withContext(function($ctx1) {
  750. var $1,$2;
  751. $1=_st($Package())._named_(packageName);
  752. _st($1)._setupClasses();
  753. _st($1)._commitPathJs_(_st("/".__comma(aString)).__comma("/js"));
  754. $2=_st($1)._commitPathSt_(_st("/".__comma(aString)).__comma("/st"));
  755. return self}, function($ctx1) {$ctx1.fill(self,"setupPackageNamed:prefix:",{packageName:packageName,aString:aString},smalltalk.PackageHandler)})},
  756. messageSends: ["setupClasses", "named:", "commitPathJs:", ",", "commitPathSt:"]}),
  757. smalltalk.PackageHandler);
  758. smalltalk.addMethod(
  759. smalltalk.method({
  760. selector: "loadPackages:prefix:",
  761. fn: function (aCollection,aString){
  762. var self=this;
  763. return smalltalk.withContext(function($ctx1) {
  764. var $1;
  765. $1=_st(self._new())._loadPackages_prefix_(aCollection,aString);
  766. return $1;
  767. }, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString},smalltalk.PackageHandler.klass)})},
  768. messageSends: ["loadPackages:prefix:", "new"]}),
  769. smalltalk.PackageHandler.klass);
  770. smalltalk.addMethod(
  771. smalltalk.method({
  772. selector: "commit",
  773. fn: function (){
  774. var self=this;
  775. function $PackageHandler(){return smalltalk.PackageHandler||(typeof PackageHandler=="undefined"?nil:PackageHandler)}
  776. return smalltalk.withContext(function($ctx1) {
  777. var $1;
  778. $1=_st(_st($PackageHandler())._new())._commit_(self);
  779. return $1;
  780. }, function($ctx1) {$ctx1.fill(self,"commit",{},smalltalk.Package)})},
  781. messageSends: ["commit:", "new"]}),
  782. smalltalk.Package);
  783. })(global_smalltalk,global_nil,global__st);