Helios-Environments.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  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. "_compileClassComment_for_",
  72. smalltalk.method({
  73. selector: "compileClassComment:for:",
  74. category: 'compiling',
  75. fn: function (aString,aClass){
  76. var self=this;
  77. return smalltalk.withContext(function($ctx1) { _st(aClass)._comment_(aString);
  78. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass}, smalltalk.HLEnvironment)})},
  79. args: ["aString", "aClass"],
  80. source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
  81. messageSends: ["comment:"],
  82. referencedClasses: []
  83. }),
  84. smalltalk.HLEnvironment);
  85. smalltalk.addMethod(
  86. "_compileClassDefinition_",
  87. smalltalk.method({
  88. selector: "compileClassDefinition:",
  89. category: 'compiling',
  90. fn: function (aString){
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) { _st(self)._eval_on_(aString,_st((smalltalk.DoIt || DoIt))._new());
  93. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLEnvironment)})},
  94. args: ["aString"],
  95. source: "compileClassDefinition: aString\x0a\x09self eval: aString on: DoIt new",
  96. messageSends: ["eval:on:", "new"],
  97. referencedClasses: ["DoIt"]
  98. }),
  99. smalltalk.HLEnvironment);
  100. smalltalk.addMethod(
  101. "_compileMethod_for_protocol_",
  102. smalltalk.method({
  103. selector: "compileMethod:for:protocol:",
  104. category: 'compiling',
  105. fn: function (sourceCode,class_,protocol){
  106. var self=this;
  107. return smalltalk.withContext(function($ctx1) { _st(class_)._compile_category_(sourceCode,protocol);
  108. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol}, smalltalk.HLEnvironment)})},
  109. args: ["sourceCode", "class", "protocol"],
  110. source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09class\x0a\x09\x09compile: sourceCode\x0a\x09\x09category: protocol",
  111. messageSends: ["compile:category:"],
  112. referencedClasses: []
  113. }),
  114. smalltalk.HLEnvironment);
  115. smalltalk.addMethod(
  116. "_eval_on_",
  117. smalltalk.method({
  118. selector: "eval:on:",
  119. category: 'actions',
  120. fn: function (someCode,aReceiver){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) { var $1;
  123. $1=_st(self)._subclassResponsibility();
  124. return $1;
  125. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLEnvironment)})},
  126. args: ["someCode", "aReceiver"],
  127. source: "eval: someCode on: aReceiver\x0a\x0a\x09^ self subclassResponsibility",
  128. messageSends: ["subclassResponsibility"],
  129. referencedClasses: []
  130. }),
  131. smalltalk.HLEnvironment);
  132. smalltalk.addMethod(
  133. "_moveMethod_toClass_",
  134. smalltalk.method({
  135. selector: "moveMethod:toClass:",
  136. category: 'actions',
  137. fn: function (aMethod,aClassName){
  138. var self=this;
  139. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  140. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName},smalltalk.HLEnvironment)})},
  141. args: ["aMethod", "aClassName"],
  142. source: "moveMethod: aMethod toClass: aClassName\x0a\x09self subclassResponsibility",
  143. messageSends: ["subclassResponsibility"],
  144. referencedClasses: []
  145. }),
  146. smalltalk.HLEnvironment);
  147. smalltalk.addMethod(
  148. "_moveMethod_toProtocol_",
  149. smalltalk.method({
  150. selector: "moveMethod:toProtocol:",
  151. category: 'actions',
  152. fn: function (aMethod,aProtocol){
  153. var self=this;
  154. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  155. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLEnvironment)})},
  156. args: ["aMethod", "aProtocol"],
  157. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09self subclassResponsibility",
  158. messageSends: ["subclassResponsibility"],
  159. referencedClasses: []
  160. }),
  161. smalltalk.HLEnvironment);
  162. smalltalk.addMethod(
  163. "_packages",
  164. smalltalk.method({
  165. selector: "packages",
  166. category: 'accessing',
  167. fn: function (){
  168. var self=this;
  169. return smalltalk.withContext(function($ctx1) { var $1;
  170. $1=_st(self)._subclassResponsibility();
  171. return $1;
  172. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLEnvironment)})},
  173. args: [],
  174. source: "packages\x0a\x09^ self subclassResponsibility",
  175. messageSends: ["subclassResponsibility"],
  176. referencedClasses: []
  177. }),
  178. smalltalk.HLEnvironment);
  179. smalltalk.addMethod(
  180. "_removeMethod_",
  181. smalltalk.method({
  182. selector: "removeMethod:",
  183. category: 'actions',
  184. fn: function (aMethod){
  185. var self=this;
  186. return smalltalk.withContext(function($ctx1) { _st(self)._sublcassResponsibility();
  187. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.HLEnvironment)})},
  188. args: ["aMethod"],
  189. source: "removeMethod: aMethod\x0a\x09self sublcassResponsibility",
  190. messageSends: ["sublcassResponsibility"],
  191. referencedClasses: []
  192. }),
  193. smalltalk.HLEnvironment);
  194. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  195. smalltalk.addMethod(
  196. "_availableClassNames",
  197. smalltalk.method({
  198. selector: "availableClassNames",
  199. category: 'accessing',
  200. fn: function (){
  201. var self=this;
  202. return smalltalk.withContext(function($ctx1) { var $1;
  203. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  204. return smalltalk.withContext(function($ctx2) { return _st(each)._name();
  205. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  206. return $1;
  207. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLLocalEnvironment)})},
  208. args: [],
  209. source: "availableClassNames\x0a\x09^ Smalltalk current classes \x0a\x09\x09collect: [ :each | each name ]",
  210. messageSends: ["collect:", "name", "classes", "current"],
  211. referencedClasses: ["Smalltalk"]
  212. }),
  213. smalltalk.HLLocalEnvironment);
  214. smalltalk.addMethod(
  215. "_availableProtocolsFor_",
  216. smalltalk.method({
  217. selector: "availableProtocolsFor:",
  218. category: 'accessing',
  219. fn: function (aClass){
  220. var self=this;
  221. var protocols;
  222. return smalltalk.withContext(function($ctx1) { var $1,$2;
  223. protocols=_st(aClass)._protocols();
  224. $1=_st(aClass)._superclass();
  225. if(($receiver = $1) == nil || $receiver == undefined){
  226. $1;
  227. } else {
  228. _st(protocols)._addAll_(_st(self)._availableProtocolsFor_(_st(aClass)._superclass()));
  229. };
  230. $2=_st(_st(protocols)._asSet())._asArray();
  231. return $2;
  232. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.HLLocalEnvironment)})},
  233. args: ["aClass"],
  234. 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",
  235. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"],
  236. referencedClasses: []
  237. }),
  238. smalltalk.HLLocalEnvironment);
  239. smalltalk.addMethod(
  240. "_classBuilder",
  241. smalltalk.method({
  242. selector: "classBuilder",
  243. category: 'accessing',
  244. fn: function (){
  245. var self=this;
  246. return smalltalk.withContext(function($ctx1) { var $1;
  247. $1=_st((smalltalk.ClassBuilder || ClassBuilder))._new();
  248. return $1;
  249. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLLocalEnvironment)})},
  250. args: [],
  251. source: "classBuilder\x0a\x09^ ClassBuilder new",
  252. messageSends: ["new"],
  253. referencedClasses: ["ClassBuilder"]
  254. }),
  255. smalltalk.HLLocalEnvironment);
  256. smalltalk.addMethod(
  257. "_eval_on_",
  258. smalltalk.method({
  259. selector: "eval:on:",
  260. category: 'actions',
  261. fn: function (aString,aReceiver){
  262. var self=this;
  263. var compiler;
  264. return smalltalk.withContext(function($ctx1) { var $1,$2;
  265. var $early={};
  266. try {
  267. compiler=_st((smalltalk.Compiler || Compiler))._new();
  268. _st((function(){
  269. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(aString);
  270. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  271. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  272. throw $early=[$1];
  273. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  274. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  275. return $2;
  276. }
  277. catch(e) {if(e===$early)return e[0]; throw e}
  278. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)})},
  279. args: ["aString", "aReceiver"],
  280. 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",
  281. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"],
  282. referencedClasses: ["Compiler", "Error"]
  283. }),
  284. smalltalk.HLLocalEnvironment);
  285. smalltalk.addMethod(
  286. "_moveMethod_toClass_",
  287. smalltalk.method({
  288. selector: "moveMethod:toClass:",
  289. category: 'actions',
  290. fn: function (aMethod,aClassName){
  291. var self=this;
  292. var destinationClass;
  293. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  294. destinationClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(_st(aClassName)._asSymbol());
  295. $1=destinationClass;
  296. if(($receiver = $1) == nil || $receiver == undefined){
  297. _st(self)._error_("Invalid class name");
  298. } else {
  299. $1;
  300. };
  301. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  302. if(smalltalk.assert($2)){
  303. $3=self;
  304. return $3;
  305. };
  306. _st(destinationClass)._adoptMethod_(aMethod);
  307. _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  308. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.HLLocalEnvironment)})},
  309. args: ["aMethod", "aClassName"],
  310. 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",
  311. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "adoptMethod:", "forsakeMethod:"],
  312. referencedClasses: ["Smalltalk"]
  313. }),
  314. smalltalk.HLLocalEnvironment);
  315. smalltalk.addMethod(
  316. "_moveMethod_toProtocol_",
  317. smalltalk.method({
  318. selector: "moveMethod:toProtocol:",
  319. category: 'actions',
  320. fn: function (aMethod,aProtocol){
  321. var self=this;
  322. return smalltalk.withContext(function($ctx1) { _st(aMethod)._category_(aProtocol);
  323. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLLocalEnvironment)})},
  324. args: ["aMethod", "aProtocol"],
  325. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod category: aProtocol",
  326. messageSends: ["category:"],
  327. referencedClasses: []
  328. }),
  329. smalltalk.HLLocalEnvironment);
  330. smalltalk.addMethod(
  331. "_packages",
  332. smalltalk.method({
  333. selector: "packages",
  334. category: 'accessing',
  335. fn: function (){
  336. var self=this;
  337. return smalltalk.withContext(function($ctx1) { var $1;
  338. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
  339. return $1;
  340. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)})},
  341. args: [],
  342. source: "packages\x0a\x09^ Smalltalk current packages",
  343. messageSends: ["packages", "current"],
  344. referencedClasses: ["Smalltalk"]
  345. }),
  346. smalltalk.HLLocalEnvironment);
  347. smalltalk.addMethod(
  348. "_removeMethod_",
  349. smalltalk.method({
  350. selector: "removeMethod:",
  351. category: 'actions',
  352. fn: function (aMethod){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) { _st(_st(aMethod)._methodClass())._forsakeMethod_(aMethod);
  355. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.HLLocalEnvironment)})},
  356. args: ["aMethod"],
  357. source: "removeMethod: aMethod\x0a\x09aMethod methodClass forsakeMethod: aMethod",
  358. messageSends: ["forsakeMethod:", "methodClass"],
  359. referencedClasses: []
  360. }),
  361. smalltalk.HLLocalEnvironment);
  362. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  363. smalltalk.addMethod(
  364. "_eval_on_",
  365. smalltalk.method({
  366. selector: "eval:on:",
  367. category: 'actions',
  368. fn: function (someCode,aReceiver){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) { _st(self)._notYetImplemented();
  371. return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)})},
  372. args: ["someCode", "aReceiver"],
  373. 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",
  374. messageSends: ["notYetImplemented"],
  375. referencedClasses: []
  376. }),
  377. smalltalk.HLRemoteEnvironment);
  378. smalltalk.addMethod(
  379. "_packages",
  380. smalltalk.method({
  381. selector: "packages",
  382. category: 'accessing',
  383. fn: function (){
  384. var self=this;
  385. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)})},
  386. args: [],
  387. 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",
  388. messageSends: [],
  389. referencedClasses: []
  390. }),
  391. smalltalk.HLRemoteEnvironment);
  392. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  393. 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"
  394. smalltalk.addMethod(
  395. "_doesNotUnderstand_",
  396. smalltalk.method({
  397. selector: "doesNotUnderstand:",
  398. category: 'actions',
  399. fn: function (aMessage){
  400. var self=this;
  401. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)})},
  402. args: ["aMessage"],
  403. source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
  404. messageSends: [],
  405. referencedClasses: []
  406. }),
  407. smalltalk.HLRemoteObject);
  408. smalltalk.addMethod(
  409. "_inspectOn_",
  410. smalltalk.method({
  411. selector: "inspectOn:",
  412. category: 'actions',
  413. fn: function (anInspector){
  414. var self=this;
  415. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)})},
  416. args: ["anInspector"],
  417. source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
  418. messageSends: [],
  419. referencedClasses: []
  420. }),
  421. smalltalk.HLRemoteObject);
  422. smalltalk.addMethod(
  423. "_printString",
  424. smalltalk.method({
  425. selector: "printString",
  426. category: 'actions',
  427. fn: function (){
  428. var self=this;
  429. return smalltalk.withContext(function($ctx1) { return "this is a remote object";
  430. }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)})},
  431. args: [],
  432. source: "printString\x0a\x09^ 'this is a remote object'",
  433. messageSends: [],
  434. referencedClasses: []
  435. }),
  436. smalltalk.HLRemoteObject);
  437. smalltalk.addMethod(
  438. "_adoptMethod_",
  439. smalltalk.method({
  440. selector: "adoptMethod:",
  441. category: '*Helios-Environments',
  442. fn: function (aMethod){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) { _st(self)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  445. return self}, function($ctx1) {$ctx1.fill(self,"adoptMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
  446. args: ["aMethod"],
  447. source: "adoptMethod: aMethod\x0a\x09self \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.",
  448. messageSends: ["compile:category:", "source", "protocol"],
  449. referencedClasses: []
  450. }),
  451. smalltalk.Behavior);
  452. smalltalk.addMethod(
  453. "_forsakeMethod_",
  454. smalltalk.method({
  455. selector: "forsakeMethod:",
  456. category: '*Helios-Environments',
  457. fn: function (aMethod){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) { _st(self)._removeCompiledMethod_(aMethod);
  460. return self}, function($ctx1) {$ctx1.fill(self,"forsakeMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
  461. args: ["aMethod"],
  462. source: "forsakeMethod: aMethod\x0a\x09self removeCompiledMethod: aMethod",
  463. messageSends: ["removeCompiledMethod:"],
  464. referencedClasses: []
  465. }),
  466. smalltalk.Behavior);