Helios-Environments.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. smalltalk.addPackage('Helios-Environments');
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
  3. smalltalk.HLEnvironment.comment="Abstract class defining common behavior for local and remote environments"
  4. smalltalk.addMethod(
  5. "_addInstVarNamed_to_",
  6. smalltalk.method({
  7. selector: "addInstVarNamed:to:",
  8. category: 'compiling',
  9. fn: function (aString, aClass) {
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) { var $1,$2;
  12. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  13. _st($1)._add_(aString);
  14. $2=_st($1)._yourself();
  15. _st(_st(self)._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  16. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass}, smalltalk.HLEnvironment)});},
  17. args: ["aString", "aClass"],
  18. source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
  19. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"],
  20. referencedClasses: []
  21. }),
  22. smalltalk.HLEnvironment);
  23. smalltalk.addMethod(
  24. "_availableClassNames",
  25. smalltalk.method({
  26. selector: "availableClassNames",
  27. category: 'accessing',
  28. fn: function () {
  29. var self=this;
  30. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  31. return self}, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLEnvironment)});},
  32. args: [],
  33. source: "availableClassNames\x0a\x09self subclassResponsibility",
  34. messageSends: ["subclassResponsibility"],
  35. referencedClasses: []
  36. }),
  37. smalltalk.HLEnvironment);
  38. smalltalk.addMethod(
  39. "_availableProtocolsFor_",
  40. smalltalk.method({
  41. selector: "availableProtocolsFor:",
  42. category: 'accessing',
  43. fn: function (aClass) {
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  46. return self}, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass},smalltalk.HLEnvironment)});},
  47. args: ["aClass"],
  48. source: "availableProtocolsFor: aClass\x0a\x09self subclassResponsibility",
  49. messageSends: ["subclassResponsibility"],
  50. referencedClasses: []
  51. }),
  52. smalltalk.HLEnvironment);
  53. smalltalk.addMethod(
  54. "_classBuilder",
  55. smalltalk.method({
  56. selector: "classBuilder",
  57. category: 'accessing',
  58. fn: function () {
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) { var $1;
  61. $1=_st(self)._subclassResponsibility();
  62. return $1;
  63. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLEnvironment)});},
  64. args: [],
  65. source: "classBuilder\x0a\x09^ self subclassResponsibility",
  66. messageSends: ["subclassResponsibility"],
  67. referencedClasses: []
  68. }),
  69. smalltalk.HLEnvironment);
  70. smalltalk.addMethod(
  71. "_classNamed_",
  72. smalltalk.method({
  73. selector: "classNamed:",
  74. category: 'accessing',
  75. fn: function (aString) {
  76. var self=this;
  77. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  78. return self}, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.HLEnvironment)});},
  79. args: ["aString"],
  80. source: "classNamed: aString\x0a\x09self subclassResponsibility",
  81. messageSends: ["subclassResponsibility"],
  82. referencedClasses: []
  83. }),
  84. smalltalk.HLEnvironment);
  85. smalltalk.addMethod(
  86. "_commitPackage_",
  87. smalltalk.method({
  88. selector: "commitPackage:",
  89. category: 'actions',
  90. fn: function (aPackage) {
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  93. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.HLEnvironment)});},
  94. args: ["aPackage"],
  95. source: "commitPackage: aPackage\x0a\x09self subclassResponsibility",
  96. messageSends: ["subclassResponsibility"],
  97. referencedClasses: []
  98. }),
  99. smalltalk.HLEnvironment);
  100. smalltalk.addMethod(
  101. "_compileClassComment_for_",
  102. smalltalk.method({
  103. selector: "compileClassComment:for:",
  104. category: 'compiling',
  105. fn: function (aString, aClass) {
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) { _st(aClass)._comment_(aString);
  108. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass}, smalltalk.HLEnvironment)});},
  109. args: ["aString", "aClass"],
  110. source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
  111. messageSends: ["comment:"],
  112. referencedClasses: []
  113. }),
  114. smalltalk.HLEnvironment);
  115. smalltalk.addMethod(
  116. "_compileClassDefinition_",
  117. smalltalk.method({
  118. selector: "compileClassDefinition:",
  119. category: 'compiling',
  120. fn: function (aString) {
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) { _st(self)._eval_on_(aString,_st((smalltalk.DoIt || DoIt))._new());
  123. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLEnvironment)});},
  124. args: ["aString"],
  125. source: "compileClassDefinition: aString\x0a\x09self eval: aString on: DoIt new",
  126. messageSends: ["eval:on:", "new"],
  127. referencedClasses: ["DoIt"]
  128. }),
  129. smalltalk.HLEnvironment);
  130. smalltalk.addMethod(
  131. "_compileMethod_for_protocol_",
  132. smalltalk.method({
  133. selector: "compileMethod:for:protocol:",
  134. category: 'compiling',
  135. fn: function (sourceCode, class_, protocol) {
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) { _st(class_)._compile_category_(sourceCode,protocol);
  138. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol}, smalltalk.HLEnvironment)});},
  139. args: ["sourceCode", "class", "protocol"],
  140. source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09class\x0a\x09\x09compile: sourceCode\x0a\x09\x09category: protocol",
  141. messageSends: ["compile:category:"],
  142. referencedClasses: []
  143. }),
  144. smalltalk.HLEnvironment);
  145. smalltalk.addMethod(
  146. "_eval_on_",
  147. smalltalk.method({
  148. selector: "eval:on:",
  149. category: 'actions',
  150. fn: function (someCode, aReceiver) {
  151. var self=this;
  152. return smalltalk.withContext(function($ctx1) { var $1;
  153. $1=_st(self)._subclassResponsibility();
  154. return $1;
  155. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLEnvironment)});},
  156. args: ["someCode", "aReceiver"],
  157. source: "eval: someCode on: aReceiver\x0a\x0a\x09^ self subclassResponsibility",
  158. messageSends: ["subclassResponsibility"],
  159. referencedClasses: []
  160. }),
  161. smalltalk.HLEnvironment);
  162. smalltalk.addMethod(
  163. "_moveMethod_toClass_",
  164. smalltalk.method({
  165. selector: "moveMethod:toClass:",
  166. category: 'actions',
  167. fn: function (aMethod, aClassName) {
  168. var self=this;
  169. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  170. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName},smalltalk.HLEnvironment)});},
  171. args: ["aMethod", "aClassName"],
  172. source: "moveMethod: aMethod toClass: aClassName\x0a\x09self subclassResponsibility",
  173. messageSends: ["subclassResponsibility"],
  174. referencedClasses: []
  175. }),
  176. smalltalk.HLEnvironment);
  177. smalltalk.addMethod(
  178. "_moveMethod_toProtocol_",
  179. smalltalk.method({
  180. selector: "moveMethod:toProtocol:",
  181. category: 'actions',
  182. fn: function (aMethod, aProtocol) {
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  185. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLEnvironment)});},
  186. args: ["aMethod", "aProtocol"],
  187. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09self subclassResponsibility",
  188. messageSends: ["subclassResponsibility"],
  189. referencedClasses: []
  190. }),
  191. smalltalk.HLEnvironment);
  192. smalltalk.addMethod(
  193. "_packages",
  194. smalltalk.method({
  195. selector: "packages",
  196. category: 'accessing',
  197. fn: function () {
  198. var self=this;
  199. return smalltalk.withContext(function($ctx1) { var $1;
  200. $1=_st(self)._subclassResponsibility();
  201. return $1;
  202. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLEnvironment)});},
  203. args: [],
  204. source: "packages\x0a\x09^ self subclassResponsibility",
  205. messageSends: ["subclassResponsibility"],
  206. referencedClasses: []
  207. }),
  208. smalltalk.HLEnvironment);
  209. smalltalk.addMethod(
  210. "_removeMethod_",
  211. smalltalk.method({
  212. selector: "removeMethod:",
  213. category: 'actions',
  214. fn: function (aMethod) {
  215. var self=this;
  216. return smalltalk.withContext(function($ctx1) { _st(self)._sublcassResponsibility();
  217. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.HLEnvironment)});},
  218. args: ["aMethod"],
  219. source: "removeMethod: aMethod\x0a\x09self sublcassResponsibility",
  220. messageSends: ["sublcassResponsibility"],
  221. referencedClasses: []
  222. }),
  223. smalltalk.HLEnvironment);
  224. smalltalk.addMethod(
  225. "_systemAnnouncer",
  226. smalltalk.method({
  227. selector: "systemAnnouncer",
  228. category: 'accessing',
  229. fn: function (){
  230. var self=this;
  231. return smalltalk.withContext(function($ctx1) {
  232. var $1;
  233. $1=_st(self)._subclassResponsibility();
  234. return $1;
  235. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.HLEnvironment)})},
  236. args: [],
  237. source: "systemAnnouncer\x0a\x09^ self subclassResponsibility",
  238. messageSends: ["subclassResponsibility"],
  239. referencedClasses: []
  240. }),
  241. smalltalk.HLEnvironment);
  242. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  243. smalltalk.addMethod(
  244. "_availableClassNames",
  245. smalltalk.method({
  246. selector: "availableClassNames",
  247. category: 'accessing',
  248. fn: function () {
  249. var self=this;
  250. return smalltalk.withContext(function($ctx1) { var $1;
  251. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  252. return smalltalk.withContext(function($ctx2) { return _st(each)._name();
  253. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  254. return $1;
  255. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLLocalEnvironment)});},
  256. args: [],
  257. source: "availableClassNames\x0a\x09^ Smalltalk current classes \x0a\x09\x09collect: [ :each | each name ]",
  258. messageSends: ["collect:", "name", "classes", "current"],
  259. referencedClasses: ["Smalltalk"]
  260. }),
  261. smalltalk.HLLocalEnvironment);
  262. smalltalk.addMethod(
  263. "_availableProtocolsFor_",
  264. smalltalk.method({
  265. selector: "availableProtocolsFor:",
  266. category: 'accessing',
  267. fn: function (aClass) {
  268. var self=this;
  269. var protocols;
  270. return smalltalk.withContext(function($ctx1) { var $1,$2;
  271. protocols=_st(aClass)._protocols();
  272. $1=_st(aClass)._superclass();
  273. if(($receiver = $1) == nil || $receiver == undefined){
  274. $1;
  275. } else {
  276. _st(protocols)._addAll_(_st(self)._availableProtocolsFor_(_st(aClass)._superclass()));
  277. };
  278. $2=_st(_st(protocols)._asSet())._asArray();
  279. return $2;
  280. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.HLLocalEnvironment)});},
  281. args: ["aClass"],
  282. source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray",
  283. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"],
  284. referencedClasses: []
  285. }),
  286. smalltalk.HLLocalEnvironment);
  287. smalltalk.addMethod(
  288. "_classBuilder",
  289. smalltalk.method({
  290. selector: "classBuilder",
  291. category: 'accessing',
  292. fn: function () {
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) { var $1;
  295. $1=_st((smalltalk.ClassBuilder || ClassBuilder))._new();
  296. return $1;
  297. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLLocalEnvironment)});},
  298. args: [],
  299. source: "classBuilder\x0a\x09^ ClassBuilder new",
  300. messageSends: ["new"],
  301. referencedClasses: ["ClassBuilder"]
  302. }),
  303. smalltalk.HLLocalEnvironment);
  304. smalltalk.addMethod(
  305. "_classNamed_",
  306. smalltalk.method({
  307. selector: "classNamed:",
  308. category: 'accessing',
  309. fn: function (aString) {
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) { var $2,$1;
  312. $2=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aString)._asSymbol());
  313. if(($receiver = $2) == nil || $receiver == undefined){
  314. $1=_st(self)._error_("Invalid class name");
  315. } else {
  316. $1=$2;
  317. };
  318. return $1;
  319. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.HLLocalEnvironment)});},
  320. args: ["aString"],
  321. source: "classNamed: aString\x0a\x09^ (Smalltalk current at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
  322. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"],
  323. referencedClasses: ["Smalltalk"]
  324. }),
  325. smalltalk.HLLocalEnvironment);
  326. smalltalk.addMethod(
  327. "_commitPackage_",
  328. smalltalk.method({
  329. selector: "commitPackage:",
  330. category: 'actions',
  331. fn: function (aPackage) {
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) {
  334. _st(aPackage)._commit();
  335. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.HLLocalEnvironment)});},
  336. args: ["aPackage"],
  337. source: "commitPackage: aPackage\x0a\x09aPackage commit",
  338. messageSends: ["commit"],
  339. referencedClasses: []
  340. }),
  341. smalltalk.HLLocalEnvironment);
  342. smalltalk.addMethod(
  343. "_eval_on_",
  344. smalltalk.method({
  345. selector: "eval:on:",
  346. category: 'actions',
  347. fn: function (aString, aReceiver) {
  348. var self=this;
  349. var compiler;
  350. return smalltalk.withContext(function($ctx1) { var $1,$2;
  351. var $early={};
  352. try {
  353. compiler=_st((smalltalk.Compiler || Compiler))._new();
  354. _st((function(){
  355. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(aString);
  356. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  357. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  358. throw $early=[$1];
  359. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  360. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  361. return $2;
  362. }
  363. catch(e) {if(e===$early)return e[0]; throw e}
  364. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)});},
  365. args: ["aString", "aReceiver"],
  366. source: "eval: aString on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ window alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: aReceiver",
  367. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"],
  368. referencedClasses: ["Compiler", "Error"]
  369. }),
  370. smalltalk.HLLocalEnvironment);
  371. smalltalk.addMethod(
  372. "_moveMethod_toClass_",
  373. smalltalk.method({
  374. selector: "moveMethod:toClass:",
  375. category: 'actions',
  376. fn: function (aMethod, aClassName) {
  377. var self=this;
  378. var destinationClass;
  379. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  380. destinationClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aClassName)._asSymbol());
  381. $1=destinationClass;
  382. if(($receiver = $1) == nil || $receiver == undefined){
  383. _st(self)._error_("Invalid class name");
  384. } else {
  385. $1;
  386. };
  387. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  388. if(smalltalk.assert($2)){
  389. $3=self;
  390. return $3;
  391. };
  392. _st(destinationClass)._adoptMethod_(aMethod);
  393. _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  394. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.HLLocalEnvironment)});},
  395. args: ["aMethod", "aClassName"],
  396. source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := Smalltalk current at: aClassName asSymbol.\x0a\x09destinationClass ifNil: [ self error: 'Invalid class name' ].\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09destinationClass adoptMethod: aMethod.\x0a\x09aMethod methodClass forsakeMethod: aMethod.\x0a\x09",
  397. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "adoptMethod:", "forsakeMethod:"],
  398. referencedClasses: ["Smalltalk"]
  399. }),
  400. smalltalk.HLLocalEnvironment);
  401. smalltalk.addMethod(
  402. "_moveMethod_toProtocol_",
  403. smalltalk.method({
  404. selector: "moveMethod:toProtocol:",
  405. category: 'actions',
  406. fn: function (aMethod, aProtocol) {
  407. var self=this;
  408. return smalltalk.withContext(function($ctx1) { _st(aMethod)._category_(aProtocol);
  409. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLLocalEnvironment)});},
  410. args: ["aMethod", "aProtocol"],
  411. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod category: aProtocol",
  412. messageSends: ["category:"],
  413. referencedClasses: []
  414. }),
  415. smalltalk.HLLocalEnvironment);
  416. smalltalk.addMethod(
  417. "_packages",
  418. smalltalk.method({
  419. selector: "packages",
  420. category: 'accessing',
  421. fn: function () {
  422. var self=this;
  423. return smalltalk.withContext(function($ctx1) { var $1;
  424. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
  425. return $1;
  426. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)});},
  427. args: [],
  428. source: "packages\x0a\x09^ Smalltalk current packages",
  429. messageSends: ["packages", "current"],
  430. referencedClasses: ["Smalltalk"]
  431. }),
  432. smalltalk.HLLocalEnvironment);
  433. smalltalk.addMethod(
  434. "_removeMethod_",
  435. smalltalk.method({
  436. selector: "removeMethod:",
  437. category: 'actions',
  438. fn: function (aMethod) {
  439. var self=this;
  440. return smalltalk.withContext(function($ctx1) { _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  441. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.HLLocalEnvironment)});},
  442. args: ["aMethod"],
  443. source: "removeMethod: aMethod\x0a\x09aMethod methodClass forsakeMethod: aMethod",
  444. messageSends: ["forsakeMethod:", "methodClass"],
  445. referencedClasses: []
  446. }),
  447. smalltalk.HLLocalEnvironment);
  448. smalltalk.addMethod(
  449. "_systemAnnouncer",
  450. smalltalk.method({
  451. selector: "systemAnnouncer",
  452. category: 'accessing',
  453. fn: function (){
  454. var self=this;
  455. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  456. return smalltalk.withContext(function($ctx1) {
  457. var $1;
  458. $1=_st($SystemAnnouncer())._current();
  459. return $1;
  460. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.HLLocalEnvironment)})},
  461. args: [],
  462. source: "systemAnnouncer\x0a\x09^ SystemAnnouncer current",
  463. messageSends: ["current"],
  464. referencedClasses: ["SystemAnnouncer"]
  465. }),
  466. smalltalk.HLLocalEnvironment);
  467. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  468. smalltalk.addMethod(
  469. "_eval_on_",
  470. smalltalk.method({
  471. selector: "eval:on:",
  472. category: 'actions',
  473. fn: function (someCode, aReceiver) {
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) { _st(self)._notYetImplemented();
  476. return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)});},
  477. args: ["someCode", "aReceiver"],
  478. source: "eval: someCode on: aReceiver\x0a\x0a\x09\x22Note for future self and friends:\x0a whatever way this compilation happens on the other side, \x0a it should return a proxy to the remote resulting object\x22\x0a \x0a self notYetImplemented",
  479. messageSends: ["notYetImplemented"],
  480. referencedClasses: []
  481. }),
  482. smalltalk.HLRemoteEnvironment);
  483. smalltalk.addMethod(
  484. "_packages",
  485. smalltalk.method({
  486. selector: "packages",
  487. category: 'accessing',
  488. fn: function () {
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)});},
  491. args: [],
  492. source: "packages\x0a\x09\x22Answer the remote environment's packages\x22\x0a \x0a\x09\x22to-do\x22\x0a \x0a \x22Note for future self and friends:\x0a the problem with remote stuff is that the answers shouldn't be expected to be\x0a received in a syncrhonous fashion. Everything network is asyc, so you *are going to deal with callbacks* here\x22",
  493. messageSends: [],
  494. referencedClasses: []
  495. }),
  496. smalltalk.HLRemoteEnvironment);
  497. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  498. smalltalk.HLRemoteObject.comment="This is a local proxy to a remote object.\x0aTipically useful for evaluating and inspecting and interacting with instances of a remote VM.\x0a"
  499. smalltalk.addMethod(
  500. "_doesNotUnderstand_",
  501. smalltalk.method({
  502. selector: "doesNotUnderstand:",
  503. category: 'actions',
  504. fn: function (aMessage) {
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)});},
  507. args: ["aMessage"],
  508. source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
  509. messageSends: [],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLRemoteObject);
  513. smalltalk.addMethod(
  514. "_inspectOn_",
  515. smalltalk.method({
  516. selector: "inspectOn:",
  517. category: 'actions',
  518. fn: function (anInspector) {
  519. var self=this;
  520. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)});},
  521. args: ["anInspector"],
  522. source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
  523. messageSends: [],
  524. referencedClasses: []
  525. }),
  526. smalltalk.HLRemoteObject);
  527. smalltalk.addMethod(
  528. "_printString",
  529. smalltalk.method({
  530. selector: "printString",
  531. category: 'actions',
  532. fn: function () {
  533. var self=this;
  534. return smalltalk.withContext(function($ctx1) { return "this is a remote object";
  535. }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)});},
  536. args: [],
  537. source: "printString\x0a\x09^ 'this is a remote object'",
  538. messageSends: [],
  539. referencedClasses: []
  540. }),
  541. smalltalk.HLRemoteObject);
  542. smalltalk.addMethod(
  543. "_adoptMethod_",
  544. smalltalk.method({
  545. selector: "adoptMethod:",
  546. category: '*Helios-Environments',
  547. fn: function (aMethod) {
  548. var self=this;
  549. return smalltalk.withContext(function($ctx1) { _st(self)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  550. return self}, function($ctx1) {$ctx1.fill(self,"adoptMethod:",{aMethod:aMethod},smalltalk.Behavior)});},
  551. args: ["aMethod"],
  552. source: "adoptMethod: aMethod\x0a\x09self \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.",
  553. messageSends: ["compile:category:", "source", "protocol"],
  554. referencedClasses: []
  555. }),
  556. smalltalk.Behavior);
  557. smalltalk.addMethod(
  558. "_forsakeMethod_",
  559. smalltalk.method({
  560. selector: "forsakeMethod:",
  561. category: '*Helios-Environments',
  562. fn: function (aMethod) {
  563. var self=this;
  564. return smalltalk.withContext(function($ctx1) { _st(self)._removeCompiledMethod_(aMethod);
  565. return self}, function($ctx1) {$ctx1.fill(self,"forsakeMethod:",{aMethod:aMethod},smalltalk.Behavior)});},
  566. args: ["aMethod"],
  567. source: "forsakeMethod: aMethod\x0a\x09self removeCompiledMethod: aMethod",
  568. messageSends: ["removeCompiledMethod:"],
  569. referencedClasses: []
  570. }),
  571. smalltalk.Behavior);