1
0

Helios-Environments.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  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.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  225. smalltalk.addMethod(
  226. "_availableClassNames",
  227. smalltalk.method({
  228. selector: "availableClassNames",
  229. category: 'accessing',
  230. fn: function () {
  231. var self=this;
  232. return smalltalk.withContext(function($ctx1) { var $1;
  233. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  234. return smalltalk.withContext(function($ctx2) { return _st(each)._name();
  235. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  236. return $1;
  237. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLLocalEnvironment)});},
  238. args: [],
  239. source: "availableClassNames\x0a\x09^ Smalltalk current classes \x0a\x09\x09collect: [ :each | each name ]",
  240. messageSends: ["collect:", "name", "classes", "current"],
  241. referencedClasses: ["Smalltalk"]
  242. }),
  243. smalltalk.HLLocalEnvironment);
  244. smalltalk.addMethod(
  245. "_availableProtocolsFor_",
  246. smalltalk.method({
  247. selector: "availableProtocolsFor:",
  248. category: 'accessing',
  249. fn: function (aClass) {
  250. var self=this;
  251. var protocols;
  252. return smalltalk.withContext(function($ctx1) { var $1,$2;
  253. protocols=_st(aClass)._protocols();
  254. $1=_st(aClass)._superclass();
  255. if(($receiver = $1) == nil || $receiver == undefined){
  256. $1;
  257. } else {
  258. _st(protocols)._addAll_(_st(self)._availableProtocolsFor_(_st(aClass)._superclass()));
  259. };
  260. $2=_st(_st(protocols)._asSet())._asArray();
  261. return $2;
  262. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.HLLocalEnvironment)});},
  263. args: ["aClass"],
  264. 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",
  265. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"],
  266. referencedClasses: []
  267. }),
  268. smalltalk.HLLocalEnvironment);
  269. smalltalk.addMethod(
  270. "_classBuilder",
  271. smalltalk.method({
  272. selector: "classBuilder",
  273. category: 'accessing',
  274. fn: function () {
  275. var self=this;
  276. return smalltalk.withContext(function($ctx1) { var $1;
  277. $1=_st((smalltalk.ClassBuilder || ClassBuilder))._new();
  278. return $1;
  279. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLLocalEnvironment)});},
  280. args: [],
  281. source: "classBuilder\x0a\x09^ ClassBuilder new",
  282. messageSends: ["new"],
  283. referencedClasses: ["ClassBuilder"]
  284. }),
  285. smalltalk.HLLocalEnvironment);
  286. smalltalk.addMethod(
  287. "_classNamed_",
  288. smalltalk.method({
  289. selector: "classNamed:",
  290. category: 'accessing',
  291. fn: function (aString) {
  292. var self=this;
  293. return smalltalk.withContext(function($ctx1) { var $2,$1;
  294. $2=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aString)._asSymbol());
  295. if(($receiver = $2) == nil || $receiver == undefined){
  296. $1=_st(self)._error_("Invalid class name");
  297. } else {
  298. $1=$2;
  299. };
  300. return $1;
  301. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.HLLocalEnvironment)});},
  302. args: ["aString"],
  303. source: "classNamed: aString\x0a\x09^ (Smalltalk current at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
  304. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"],
  305. referencedClasses: ["Smalltalk"]
  306. }),
  307. smalltalk.HLLocalEnvironment);
  308. smalltalk.addMethod(
  309. "_commitPackage_",
  310. smalltalk.method({
  311. selector: "commitPackage:",
  312. category: 'actions',
  313. fn: function (aPackage) {
  314. var self=this;
  315. return smalltalk.withContext(function($ctx1) {
  316. _st(aPackage)._commit();
  317. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.HLLocalEnvironment)});},
  318. args: ["aPackage"],
  319. source: "commitPackage: aPackage\x0a\x09aPackage commit",
  320. messageSends: ["commit"],
  321. referencedClasses: []
  322. }),
  323. smalltalk.HLLocalEnvironment);
  324. smalltalk.addMethod(
  325. "_eval_on_",
  326. smalltalk.method({
  327. selector: "eval:on:",
  328. category: 'actions',
  329. fn: function (aString, aReceiver) {
  330. var self=this;
  331. var compiler;
  332. return smalltalk.withContext(function($ctx1) { var $1,$2;
  333. var $early={};
  334. try {
  335. compiler=_st((smalltalk.Compiler || Compiler))._new();
  336. _st((function(){
  337. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(aString);
  338. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  339. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  340. throw $early=[$1];
  341. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  342. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  343. return $2;
  344. }
  345. catch(e) {if(e===$early)return e[0]; throw e}
  346. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)});},
  347. args: ["aString", "aReceiver"],
  348. 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",
  349. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"],
  350. referencedClasses: ["Compiler", "Error"]
  351. }),
  352. smalltalk.HLLocalEnvironment);
  353. smalltalk.addMethod(
  354. "_moveMethod_toClass_",
  355. smalltalk.method({
  356. selector: "moveMethod:toClass:",
  357. category: 'actions',
  358. fn: function (aMethod, aClassName) {
  359. var self=this;
  360. var destinationClass;
  361. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  362. destinationClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aClassName)._asSymbol());
  363. $1=destinationClass;
  364. if(($receiver = $1) == nil || $receiver == undefined){
  365. _st(self)._error_("Invalid class name");
  366. } else {
  367. $1;
  368. };
  369. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  370. if(smalltalk.assert($2)){
  371. $3=self;
  372. return $3;
  373. };
  374. _st(destinationClass)._adoptMethod_(aMethod);
  375. _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  376. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.HLLocalEnvironment)});},
  377. args: ["aMethod", "aClassName"],
  378. 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",
  379. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "adoptMethod:", "forsakeMethod:"],
  380. referencedClasses: ["Smalltalk"]
  381. }),
  382. smalltalk.HLLocalEnvironment);
  383. smalltalk.addMethod(
  384. "_moveMethod_toProtocol_",
  385. smalltalk.method({
  386. selector: "moveMethod:toProtocol:",
  387. category: 'actions',
  388. fn: function (aMethod, aProtocol) {
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { _st(aMethod)._category_(aProtocol);
  391. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLLocalEnvironment)});},
  392. args: ["aMethod", "aProtocol"],
  393. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod category: aProtocol",
  394. messageSends: ["category:"],
  395. referencedClasses: []
  396. }),
  397. smalltalk.HLLocalEnvironment);
  398. smalltalk.addMethod(
  399. "_packages",
  400. smalltalk.method({
  401. selector: "packages",
  402. category: 'accessing',
  403. fn: function () {
  404. var self=this;
  405. return smalltalk.withContext(function($ctx1) { var $1;
  406. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
  407. return $1;
  408. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)});},
  409. args: [],
  410. source: "packages\x0a\x09^ Smalltalk current packages",
  411. messageSends: ["packages", "current"],
  412. referencedClasses: ["Smalltalk"]
  413. }),
  414. smalltalk.HLLocalEnvironment);
  415. smalltalk.addMethod(
  416. "_removeMethod_",
  417. smalltalk.method({
  418. selector: "removeMethod:",
  419. category: 'actions',
  420. fn: function (aMethod) {
  421. var self=this;
  422. return smalltalk.withContext(function($ctx1) { _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  423. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.HLLocalEnvironment)});},
  424. args: ["aMethod"],
  425. source: "removeMethod: aMethod\x0a\x09aMethod methodClass forsakeMethod: aMethod",
  426. messageSends: ["forsakeMethod:", "methodClass"],
  427. referencedClasses: []
  428. }),
  429. smalltalk.HLLocalEnvironment);
  430. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  431. smalltalk.addMethod(
  432. "_eval_on_",
  433. smalltalk.method({
  434. selector: "eval:on:",
  435. category: 'actions',
  436. fn: function (someCode, aReceiver) {
  437. var self=this;
  438. return smalltalk.withContext(function($ctx1) { _st(self)._notYetImplemented();
  439. return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)});},
  440. args: ["someCode", "aReceiver"],
  441. 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",
  442. messageSends: ["notYetImplemented"],
  443. referencedClasses: []
  444. }),
  445. smalltalk.HLRemoteEnvironment);
  446. smalltalk.addMethod(
  447. "_packages",
  448. smalltalk.method({
  449. selector: "packages",
  450. category: 'accessing',
  451. fn: function () {
  452. var self=this;
  453. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)});},
  454. args: [],
  455. 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",
  456. messageSends: [],
  457. referencedClasses: []
  458. }),
  459. smalltalk.HLRemoteEnvironment);
  460. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  461. 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"
  462. smalltalk.addMethod(
  463. "_doesNotUnderstand_",
  464. smalltalk.method({
  465. selector: "doesNotUnderstand:",
  466. category: 'actions',
  467. fn: function (aMessage) {
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)});},
  470. args: ["aMessage"],
  471. source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
  472. messageSends: [],
  473. referencedClasses: []
  474. }),
  475. smalltalk.HLRemoteObject);
  476. smalltalk.addMethod(
  477. "_inspectOn_",
  478. smalltalk.method({
  479. selector: "inspectOn:",
  480. category: 'actions',
  481. fn: function (anInspector) {
  482. var self=this;
  483. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)});},
  484. args: ["anInspector"],
  485. source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
  486. messageSends: [],
  487. referencedClasses: []
  488. }),
  489. smalltalk.HLRemoteObject);
  490. smalltalk.addMethod(
  491. "_printString",
  492. smalltalk.method({
  493. selector: "printString",
  494. category: 'actions',
  495. fn: function () {
  496. var self=this;
  497. return smalltalk.withContext(function($ctx1) { return "this is a remote object";
  498. }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)});},
  499. args: [],
  500. source: "printString\x0a\x09^ 'this is a remote object'",
  501. messageSends: [],
  502. referencedClasses: []
  503. }),
  504. smalltalk.HLRemoteObject);
  505. smalltalk.addMethod(
  506. "_adoptMethod_",
  507. smalltalk.method({
  508. selector: "adoptMethod:",
  509. category: '*Helios-Environments',
  510. fn: function (aMethod) {
  511. var self=this;
  512. return smalltalk.withContext(function($ctx1) { _st(self)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  513. return self}, function($ctx1) {$ctx1.fill(self,"adoptMethod:",{aMethod:aMethod},smalltalk.Behavior)});},
  514. args: ["aMethod"],
  515. source: "adoptMethod: aMethod\x0a\x09self \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.",
  516. messageSends: ["compile:category:", "source", "protocol"],
  517. referencedClasses: []
  518. }),
  519. smalltalk.Behavior);
  520. smalltalk.addMethod(
  521. "_forsakeMethod_",
  522. smalltalk.method({
  523. selector: "forsakeMethod:",
  524. category: '*Helios-Environments',
  525. fn: function (aMethod) {
  526. var self=this;
  527. return smalltalk.withContext(function($ctx1) { _st(self)._removeCompiledMethod_(aMethod);
  528. return self}, function($ctx1) {$ctx1.fill(self,"forsakeMethod:",{aMethod:aMethod},smalltalk.Behavior)});},
  529. args: ["aMethod"],
  530. source: "forsakeMethod: aMethod\x0a\x09self removeCompiledMethod: aMethod",
  531. messageSends: ["removeCompiledMethod:"],
  532. referencedClasses: []
  533. }),
  534. smalltalk.Behavior);