Importer-Exporter.deploy.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  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_(pkg,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:", "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 (package_,stream){
  243. var self=this;
  244. return smalltalk.withContext(function($ctx1) {
  245. self._exportPackagePrologueOf_on_(package_,stream);
  246. _st((function(){
  247. return smalltalk.withContext(function($ctx2) {
  248. self._exportPackageDefinitionOf_on_(package_,stream);
  249. _st(_st(_st(package_)._sortedClasses())._asSet())._do_((function(each){
  250. return smalltalk.withContext(function($ctx3) {
  251. return self._exportClass_on_(each,stream);
  252. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2)})}));
  253. return self._exportPackageExtensionsOf_on_(package_,stream);
  254. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
  255. return smalltalk.withContext(function($ctx2) {
  256. return self._exportPackageEpilogueOf_on_(package_,stream);
  257. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  258. return self}, function($ctx1) {$ctx1.fill(self,"exportPackage:on:",{package_:package_,stream:stream},smalltalk.Exporter)})},
  259. messageSends: ["exportPackagePrologueOf:on:", "ensure:", "exportPackageEpilogueOf:on:", "exportPackageDefinitionOf:on:", "do:", "exportClass:on:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"]}),
  260. smalltalk.Exporter);
  261. smalltalk.addMethod(
  262. smalltalk.method({
  263. selector: "exportPackageDefinitionOf:on:",
  264. fn: function (package_,aStream){
  265. var self=this;
  266. return smalltalk.withContext(function($ctx1) {
  267. var $1,$2;
  268. $1=aStream;
  269. _st($1)._nextPutAll_("smalltalk.addPackage(");
  270. _st($1)._nextPutAll_(_st("'".__comma(_st(package_)._name())).__comma("');"));
  271. $2=_st($1)._lf();
  272. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream},smalltalk.Exporter)})},
  273. messageSends: ["nextPutAll:", ",", "name", "lf"]}),
  274. smalltalk.Exporter);
  275. smalltalk.addMethod(
  276. smalltalk.method({
  277. selector: "exportPackageEpilogueOf:on:",
  278. fn: function (aPackage,aStream){
  279. var self=this;
  280. return smalltalk.withContext(function($ctx1) {
  281. var $1,$2;
  282. $1=aStream;
  283. _st($1)._nextPutAll_("})(global_smalltalk,global_nil,global__st);");
  284. $2=_st($1)._lf();
  285. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
  286. messageSends: ["nextPutAll:", "lf"]}),
  287. smalltalk.Exporter);
  288. smalltalk.addMethod(
  289. smalltalk.method({
  290. selector: "exportPackageExtensionsOf:on:",
  291. fn: function (package_,aStream){
  292. var self=this;
  293. var name;
  294. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  295. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  296. return smalltalk.withContext(function($ctx1) {
  297. var $1;
  298. name=_st(package_)._name();
  299. _st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
  300. return smalltalk.withContext(function($ctx2) {
  301. return _st([each,_st(each)._class()])._do_((function(aClass){
  302. return smalltalk.withContext(function($ctx3) {
  303. return _st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
  304. return smalltalk.withContext(function($ctx4) {
  305. return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  306. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3)})})))._do_((function(method){
  307. return smalltalk.withContext(function($ctx4) {
  308. $1=_st(_st(method)._category())._match_("^\x5c*".__comma(name));
  309. if(smalltalk.assert($1)){
  310. return self._exportMethod_on_(method,aStream);
  311. };
  312. }, function($ctx4) {$ctx4.fillBlock({method:method},$ctx3)})}));
  313. }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2)})}));
  314. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  315. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name},smalltalk.Exporter)})},
  316. messageSends: ["name", "do:", "ifTrue:", "exportMethod:on:", "match:", ",", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "class", "sortedClasses:", "classes", "current"]}),
  317. smalltalk.Exporter);
  318. smalltalk.addMethod(
  319. smalltalk.method({
  320. selector: "exportPackagePrologueOf:on:",
  321. fn: function (aPackage,aStream){
  322. var self=this;
  323. return smalltalk.withContext(function($ctx1) {
  324. var $1,$2;
  325. $1=aStream;
  326. _st($1)._nextPutAll_("(function(smalltalk,nil,_st){");
  327. $2=_st($1)._lf();
  328. return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
  329. messageSends: ["nextPutAll:", "lf"]}),
  330. smalltalk.Exporter);
  331. smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
  332. smalltalk.addMethod(
  333. smalltalk.method({
  334. selector: "chunkEscape:",
  335. fn: function (aString){
  336. var self=this;
  337. return smalltalk.withContext(function($ctx1) {
  338. var $1;
  339. $1=_st(_st(aString)._replace_with_("!","!!"))._trimBoth();
  340. return $1;
  341. }, function($ctx1) {$ctx1.fill(self,"chunkEscape:",{aString:aString},smalltalk.ChunkExporter)})},
  342. messageSends: ["trimBoth", "replace:with:"]}),
  343. smalltalk.ChunkExporter);
  344. smalltalk.addMethod(
  345. smalltalk.method({
  346. selector: "classNameFor:",
  347. fn: function (aClass){
  348. var self=this;
  349. return smalltalk.withContext(function($ctx1) {
  350. var $2,$3,$1;
  351. $2=_st(aClass)._isMetaclass();
  352. if(smalltalk.assert($2)){
  353. $1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
  354. } else {
  355. $3=_st(aClass)._isNil();
  356. if(smalltalk.assert($3)){
  357. $1="nil";
  358. } else {
  359. $1=_st(aClass)._name();
  360. };
  361. };
  362. return $1;
  363. }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.ChunkExporter)})},
  364. messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"]}),
  365. smalltalk.ChunkExporter);
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "exportCategory:on:",
  369. fn: function (category,aStream){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) {
  372. var $1,$2,$3,$4;
  373. $1=aStream;
  374. _st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(category)._at_("class"))));
  375. $2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(category)._at_("name"))).__comma("'!"));
  376. _st(_st(_st(category)._at_("methods"))._sorted_((function(a,b){
  377. return smalltalk.withContext(function($ctx2) {
  378. return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
  379. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  380. return smalltalk.withContext(function($ctx2) {
  381. return self._exportMethod_on_(each,aStream);
  382. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  383. $3=aStream;
  384. _st($3)._nextPutAll_(" !");
  385. _st($3)._lf();
  386. $4=_st($3)._lf();
  387. return self}, function($ctx1) {$ctx1.fill(self,"exportCategory:on:",{category:category,aStream:aStream},smalltalk.ChunkExporter)})},
  388. messageSends: ["nextPutAll:", ",", "classNameFor:", "at:", "do:", "exportMethod:on:", "sorted:", "<=", "selector", "lf"]}),
  389. smalltalk.ChunkExporter);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "exportDefinitionOf:on:",
  393. fn: function (aClass,aStream){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. var $1,$2,$3,$4,$5,$6,$7;
  397. $1=aStream;
  398. _st($1)._nextPutAll_(self._classNameFor_(_st(aClass)._superclass()));
  399. _st($1)._nextPutAll_(" subclass: #".__comma(self._classNameFor_(aClass)));
  400. _st($1)._lf();
  401. _st($1)._tab();
  402. $2=_st($1)._nextPutAll_("instanceVariableNames: '");
  403. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  404. return smalltalk.withContext(function($ctx2) {
  405. return _st(aStream)._nextPutAll_(each);
  406. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  407. return smalltalk.withContext(function($ctx2) {
  408. return _st(aStream)._nextPutAll_(" ");
  409. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  410. $3=aStream;
  411. _st($3)._nextPutAll_("'");
  412. _st($3)._lf();
  413. _st($3)._tab();
  414. _st($3)._nextPutAll_(_st("package: '".__comma(_st(aClass)._category())).__comma("'!"));
  415. $4=_st($3)._lf();
  416. $5=_st(_st(aClass)._comment())._notEmpty();
  417. if(smalltalk.assert($5)){
  418. $6=aStream;
  419. _st($6)._nextPutAll_(_st("!".__comma(self._classNameFor_(aClass))).__comma(" commentStamp!"));
  420. _st($6)._lf();
  421. _st($6)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
  422. $7=_st($6)._lf();
  423. $7;
  424. };
  425. _st(aStream)._lf();
  426. return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
  427. messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "chunkEscape:", "comment", "notEmpty"]}),
  428. smalltalk.ChunkExporter);
  429. smalltalk.addMethod(
  430. smalltalk.method({
  431. selector: "exportMetaDefinitionOf:on:",
  432. fn: function (aClass,aStream){
  433. var self=this;
  434. return smalltalk.withContext(function($ctx1) {
  435. var $1,$2,$3,$4,$5;
  436. $1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
  437. if(! smalltalk.assert($1)){
  438. $2=aStream;
  439. _st($2)._nextPutAll_(self._classNameFor_(_st(aClass)._class()));
  440. $3=_st($2)._nextPutAll_(" instanceVariableNames: '");
  441. $3;
  442. _st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
  443. return smalltalk.withContext(function($ctx2) {
  444. return _st(aStream)._nextPutAll_(each);
  445. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  446. return smalltalk.withContext(function($ctx2) {
  447. return _st(aStream)._nextPutAll_(" ");
  448. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  449. $4=aStream;
  450. _st($4)._nextPutAll_("'!");
  451. _st($4)._lf();
  452. $5=_st($4)._lf();
  453. $5;
  454. };
  455. return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
  456. messageSends: ["ifFalse:", "nextPutAll:", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"]}),
  457. smalltalk.ChunkExporter);
  458. smalltalk.addMethod(
  459. smalltalk.method({
  460. selector: "exportMethod:on:",
  461. fn: function (aMethod,aStream){
  462. var self=this;
  463. return smalltalk.withContext(function($ctx1) {
  464. var $1,$2;
  465. $1=aStream;
  466. _st($1)._lf();
  467. _st($1)._lf();
  468. _st($1)._nextPutAll_(self._chunkEscape_(_st(aMethod)._source()));
  469. _st($1)._lf();
  470. $2=_st($1)._nextPutAll_("!");
  471. return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.ChunkExporter)})},
  472. messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"]}),
  473. smalltalk.ChunkExporter);
  474. smalltalk.addMethod(
  475. smalltalk.method({
  476. selector: "exportMethodsOf:on:",
  477. fn: function (aClass,aStream){
  478. var self=this;
  479. var map;
  480. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  481. return smalltalk.withContext(function($ctx1) {
  482. var $1;
  483. map=_st($Dictionary())._new();
  484. _st(aClass)._protocolsDo_((function(category,methods){
  485. return smalltalk.withContext(function($ctx2) {
  486. $1=_st(category)._match_("^\x5c*");
  487. if(! smalltalk.assert($1)){
  488. return _st(map)._at_put_(category,methods);
  489. };
  490. }, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})}));
  491. _st(_st(_st(map)._keys())._sorted_((function(a,b){
  492. return smalltalk.withContext(function($ctx2) {
  493. return _st(a).__lt_eq(b);
  494. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(category){
  495. var methods;
  496. return smalltalk.withContext(function($ctx2) {
  497. methods=_st(map)._at_(category);
  498. methods;
  499. return self._exportCategory_on_(smalltalk.HashedCollection._from_(["methods".__minus_gt(methods),"name".__minus_gt(category),"class".__minus_gt(aClass)]),aStream);
  500. }, function($ctx2) {$ctx2.fillBlock({category:category,methods:methods},$ctx1)})}));
  501. return self}, function($ctx1) {$ctx1.fill(self,"exportMethodsOf:on:",{aClass:aClass,aStream:aStream,map:map},smalltalk.ChunkExporter)})},
  502. messageSends: ["new", "protocolsDo:", "ifFalse:", "at:put:", "match:", "do:", "at:", "exportCategory:on:", "->", "sorted:", "<=", "keys"]}),
  503. smalltalk.ChunkExporter);
  504. smalltalk.addMethod(
  505. smalltalk.method({
  506. selector: "exportPackageDefinitionOf:on:",
  507. fn: function (package_,aStream){
  508. var self=this;
  509. return smalltalk.withContext(function($ctx1) {
  510. var $1,$2;
  511. $1=aStream;
  512. _st($1)._nextPutAll_(_st("Smalltalk current createPackage: '".__comma(_st(package_)._name())).__comma("'!"));
  513. $2=_st($1)._lf();
  514. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{package_:package_,aStream:aStream},smalltalk.ChunkExporter)})},
  515. messageSends: ["nextPutAll:", ",", "name", "lf"]}),
  516. smalltalk.ChunkExporter);
  517. smalltalk.addMethod(
  518. smalltalk.method({
  519. selector: "exportPackageEpilogueOf:on:",
  520. fn: function (aPackage,aStream){
  521. var self=this;
  522. return smalltalk.withContext(function($ctx1) {
  523. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageEpilogueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
  524. messageSends: []}),
  525. smalltalk.ChunkExporter);
  526. smalltalk.addMethod(
  527. smalltalk.method({
  528. selector: "exportPackageExtensionsOf:on:",
  529. fn: function (package_,aStream){
  530. var self=this;
  531. var name,map;
  532. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  533. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  534. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  535. return smalltalk.withContext(function($ctx1) {
  536. var $1;
  537. name=_st(package_)._name();
  538. _st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
  539. return smalltalk.withContext(function($ctx2) {
  540. return _st([each,_st(each)._class()])._do_((function(aClass){
  541. return smalltalk.withContext(function($ctx3) {
  542. map=_st($Dictionary())._new();
  543. map;
  544. _st(aClass)._protocolsDo_((function(category,methods){
  545. return smalltalk.withContext(function($ctx4) {
  546. $1=_st(category)._match_("^\x5c*".__comma(name));
  547. if(smalltalk.assert($1)){
  548. return _st(map)._at_put_(category,methods);
  549. };
  550. }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3)})}));
  551. return _st(_st(_st(map)._keys())._sorted_((function(a,b){
  552. return smalltalk.withContext(function($ctx4) {
  553. return _st(a).__lt_eq(b);
  554. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3)})})))._do_((function(category){
  555. var methods;
  556. return smalltalk.withContext(function($ctx4) {
  557. methods=_st(map)._at_(category);
  558. methods;
  559. return self._exportCategory_on_(smalltalk.HashedCollection._from_(["methods".__minus_gt(methods),"name".__minus_gt(category),"class".__minus_gt(aClass)]),aStream);
  560. }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3)})}));
  561. }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2)})}));
  562. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  563. return self}, function($ctx1) {$ctx1.fill(self,"exportPackageExtensionsOf:on:",{package_:package_,aStream:aStream,name:name,map:map},smalltalk.ChunkExporter)})},
  564. messageSends: ["name", "do:", "new", "protocolsDo:", "ifTrue:", "at:put:", "match:", ",", "at:", "exportCategory:on:", "->", "sorted:", "<=", "keys", "class", "sortedClasses:", "classes", "current"]}),
  565. smalltalk.ChunkExporter);
  566. smalltalk.addMethod(
  567. smalltalk.method({
  568. selector: "exportPackagePrologueOf:on:",
  569. fn: function (aPackage,aStream){
  570. var self=this;
  571. return smalltalk.withContext(function($ctx1) {
  572. return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
  573. messageSends: []}),
  574. smalltalk.ChunkExporter);
  575. smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
  576. smalltalk.addMethod(
  577. smalltalk.method({
  578. selector: "exportDefinitionOf:on:",
  579. fn: function (aClass,aStream){
  580. var self=this;
  581. return smalltalk.withContext(function($ctx1) {
  582. var $1,$2,$3,$4;
  583. $1=aStream;
  584. _st($1)._nextPutAll_("smalltalk.addClass(");
  585. _st($1)._nextPutAll_(_st("'".__comma(self._classNameFor_(aClass))).__comma("', "));
  586. _st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._superclass())));
  587. $2=_st($1)._nextPutAll_(", [");
  588. _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
  589. return smalltalk.withContext(function($ctx2) {
  590. return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
  591. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  592. return smalltalk.withContext(function($ctx2) {
  593. return _st(aStream)._nextPutAll_(", ");
  594. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  595. $3=aStream;
  596. _st($3)._nextPutAll_("], '");
  597. _st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
  598. $4=_st($3)._nextPutAll_(");");
  599. _st(aStream)._lf();
  600. return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.StrippedExporter)})},
  601. messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"]}),
  602. smalltalk.StrippedExporter);
  603. smalltalk.addMethod(
  604. smalltalk.method({
  605. selector: "exportMethod:on:",
  606. fn: function (aMethod,aStream){
  607. var self=this;
  608. return smalltalk.withContext(function($ctx1) {
  609. var $1,$2;
  610. $1=aStream;
  611. _st($1)._nextPutAll_("smalltalk.addMethod(");
  612. _st($1)._lf();
  613. _st($1)._nextPutAll_("smalltalk.method({");
  614. _st($1)._lf();
  615. _st($1)._nextPutAll_(_st("selector: ".__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
  616. _st($1)._lf();
  617. _st($1)._nextPutAll_(_st("fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
  618. _st($1)._lf();
  619. _st($1)._nextPutAll_("messageSends: ".__comma(_st(_st(aMethod)._messageSends())._asJavascript()));
  620. _st($1)._nextPutAll_("}),");
  621. _st($1)._lf();
  622. _st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
  623. _st($1)._nextPutAll_(");");
  624. _st($1)._lf();
  625. $2=_st($1)._lf();
  626. return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.StrippedExporter)})},
  627. messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "selector", "compiledSource", "fn", "messageSends", "classNameFor:", "methodClass"]}),
  628. smalltalk.StrippedExporter);
  629. smalltalk.addClass('Importer', smalltalk.Object, [], 'Importer-Exporter');
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "import:",
  633. fn: function (aStream){
  634. var self=this;
  635. var chunk,result,parser,lastEmpty;
  636. function $ChunkParser(){return smalltalk.ChunkParser||(typeof ChunkParser=="undefined"?nil:ChunkParser)}
  637. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  638. return smalltalk.withContext(function($ctx1) {
  639. var $1,$2;
  640. parser=_st($ChunkParser())._on_(aStream);
  641. lastEmpty=false;
  642. _st((function(){
  643. return smalltalk.withContext(function($ctx2) {
  644. chunk=_st(parser)._nextChunk();
  645. chunk;
  646. return _st(chunk)._isNil();
  647. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  648. return smalltalk.withContext(function($ctx2) {
  649. $1=_st(chunk)._isEmpty();
  650. if(smalltalk.assert($1)){
  651. lastEmpty=true;
  652. return lastEmpty;
  653. } else {
  654. result=_st(_st($Compiler())._new())._evaluateExpression_(chunk);
  655. result;
  656. $2=lastEmpty;
  657. if(smalltalk.assert($2)){
  658. lastEmpty=false;
  659. lastEmpty;
  660. return _st(result)._scanFrom_(parser);
  661. };
  662. };
  663. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  664. return self}, function($ctx1) {$ctx1.fill(self,"import:",{aStream:aStream,chunk:chunk,result:result,parser:parser,lastEmpty:lastEmpty},smalltalk.Importer)})},
  665. messageSends: ["on:", "whileFalse:", "ifTrue:ifFalse:", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "isEmpty", "nextChunk", "isNil"]}),
  666. smalltalk.Importer);
  667. smalltalk.addClass('PackageHandler', smalltalk.Object, [], 'Importer-Exporter');
  668. smalltalk.addMethod(
  669. smalltalk.method({
  670. selector: "ajaxPutAt:data:",
  671. fn: function (aURL,aString){
  672. var self=this;
  673. return smalltalk.withContext(function($ctx1) {
  674. _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){
  675. return smalltalk.withContext(function($ctx2) {
  676. return self._error_(_st(_st(_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
  677. }, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1)})}))]));
  678. return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
  679. messageSends: ["ajax:options:", "->", "error:", ",", "responseText"]}),
  680. smalltalk.PackageHandler);
  681. smalltalk.addMethod(
  682. smalltalk.method({
  683. selector: "commit:",
  684. fn: function (aPackage){
  685. var self=this;
  686. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  687. function $Exporter(){return smalltalk.Exporter||(typeof Exporter=="undefined"?nil:Exporter)}
  688. function $StrippedExporter(){return smalltalk.StrippedExporter||(typeof StrippedExporter=="undefined"?nil:StrippedExporter)}
  689. function $ChunkExporter(){return smalltalk.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}
  690. return smalltalk.withContext(function($ctx1) {
  691. _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){
  692. var fileContents;
  693. return smalltalk.withContext(function($ctx2) {
  694. fileContents=_st($String())._streamContents_((function(stream){
  695. return smalltalk.withContext(function($ctx3) {
  696. return _st(_st(_st(commitStrategy)._key())._new())._exportPackage_on_(aPackage,stream);
  697. }, function($ctx3) {$ctx3.fillBlock({stream:stream},$ctx2)})}));
  698. fileContents;
  699. return self._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
  700. }, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}),"Committing package ".__comma(_st(aPackage)._name()));
  701. return self}, function($ctx1) {$ctx1.fill(self,"commit:",{aPackage:aPackage},smalltalk.PackageHandler)})},
  702. messageSends: ["do:displayingProgress:", "streamContents:", "exportPackage:on:", "new", "key", "ajaxPutAt:data:", "value", ",", "name", "->", "commitPathJs", "commitPathSt"]}),
  703. smalltalk.PackageHandler);
  704. smalltalk.addMethod(
  705. smalltalk.method({
  706. selector: "loadPackage:prefix:",
  707. fn: function (packageName,aString){
  708. var self=this;
  709. var url;
  710. return smalltalk.withContext(function($ctx1) {
  711. var $1;
  712. url=_st(_st(_st("/".__comma(aString)).__comma("/js/")).__comma(packageName)).__comma(".js");
  713. _st(jQuery)._ajax_options_(url,smalltalk.HashedCollection._from_(["type".__minus_gt("GET"),"dataType".__minus_gt("script"),"complete".__minus_gt((function(jqXHR,textStatus){
  714. return smalltalk.withContext(function($ctx2) {
  715. $1=_st(_st(jqXHR)._readyState()).__eq((4));
  716. if(smalltalk.assert($1)){
  717. return self._setupPackageNamed_prefix_(packageName,aString);
  718. };
  719. }, function($ctx2) {$ctx2.fillBlock({jqXHR:jqXHR,textStatus:textStatus},$ctx1)})})),"error".__minus_gt((function(){
  720. return smalltalk.withContext(function($ctx2) {
  721. return _st(window)._alert_("Could not load package at: ".__comma(url));
  722. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]));
  723. return self}, function($ctx1) {$ctx1.fill(self,"loadPackage:prefix:",{packageName:packageName,aString:aString,url:url},smalltalk.PackageHandler)})},
  724. messageSends: [",", "ajax:options:", "->", "ifTrue:", "setupPackageNamed:prefix:", "=", "readyState", "alert:"]}),
  725. smalltalk.PackageHandler);
  726. smalltalk.addMethod(
  727. smalltalk.method({
  728. selector: "loadPackages:prefix:",
  729. fn: function (aCollection,aString){
  730. var self=this;
  731. return smalltalk.withContext(function($ctx1) {
  732. _st(aCollection)._do_((function(each){
  733. return smalltalk.withContext(function($ctx2) {
  734. return self._loadPackage_prefix_(each,aString);
  735. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  736. return self}, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString},smalltalk.PackageHandler)})},
  737. messageSends: ["do:", "loadPackage:prefix:"]}),
  738. smalltalk.PackageHandler);
  739. smalltalk.addMethod(
  740. smalltalk.method({
  741. selector: "setupPackageNamed:prefix:",
  742. fn: function (packageName,aString){
  743. var self=this;
  744. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  745. return smalltalk.withContext(function($ctx1) {
  746. var $1,$2;
  747. $1=_st($Package())._named_(packageName);
  748. _st($1)._setupClasses();
  749. _st($1)._commitPathJs_(_st("/".__comma(aString)).__comma("/js"));
  750. $2=_st($1)._commitPathSt_(_st("/".__comma(aString)).__comma("/st"));
  751. return self}, function($ctx1) {$ctx1.fill(self,"setupPackageNamed:prefix:",{packageName:packageName,aString:aString},smalltalk.PackageHandler)})},
  752. messageSends: ["setupClasses", "named:", "commitPathJs:", ",", "commitPathSt:"]}),
  753. smalltalk.PackageHandler);
  754. smalltalk.addMethod(
  755. smalltalk.method({
  756. selector: "loadPackages:prefix:",
  757. fn: function (aCollection,aString){
  758. var self=this;
  759. return smalltalk.withContext(function($ctx1) {
  760. var $1;
  761. $1=_st(self._new())._loadPackages_prefix_(aCollection,aString);
  762. return $1;
  763. }, function($ctx1) {$ctx1.fill(self,"loadPackages:prefix:",{aCollection:aCollection,aString:aString},smalltalk.PackageHandler.klass)})},
  764. messageSends: ["loadPackages:prefix:", "new"]}),
  765. smalltalk.PackageHandler.klass);
  766. smalltalk.addMethod(
  767. smalltalk.method({
  768. selector: "commit",
  769. fn: function (){
  770. var self=this;
  771. function $PackageHandler(){return smalltalk.PackageHandler||(typeof PackageHandler=="undefined"?nil:PackageHandler)}
  772. return smalltalk.withContext(function($ctx1) {
  773. var $1;
  774. $1=_st(_st($PackageHandler())._new())._commit_(self);
  775. return $1;
  776. }, function($ctx1) {$ctx1.fill(self,"commit",{},smalltalk.Package)})},
  777. messageSends: ["commit:", "new"]}),
  778. smalltalk.Package);
  779. })(global_smalltalk,global_nil,global__st);