Helios-Environments.deploy.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. smalltalk.addPackage('Helios-Environments');
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
  3. smalltalk.addMethod(
  4. "_addInstVarNamed_to_",
  5. smalltalk.method({
  6. selector: "addInstVarNamed:to:",
  7. fn: function (aString,aClass){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1,$2;
  10. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  11. _st($1)._add_(aString);
  12. $2=_st($1)._yourself();
  13. _st(_st(self)._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  14. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass}, smalltalk.HLEnvironment)})},
  15. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
  16. smalltalk.HLEnvironment);
  17. smalltalk.addMethod(
  18. "_classBuilder",
  19. smalltalk.method({
  20. selector: "classBuilder",
  21. fn: function (){
  22. var self=this;
  23. return smalltalk.withContext(function($ctx1) { var $1;
  24. $1=_st(self)._subclassResponsibility();
  25. return $1;
  26. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLEnvironment)})},
  27. messageSends: ["subclassResponsibility"]}),
  28. smalltalk.HLEnvironment);
  29. smalltalk.addMethod(
  30. "_compileClassComment_for_",
  31. smalltalk.method({
  32. selector: "compileClassComment:for:",
  33. fn: function (aString,aClass){
  34. var self=this;
  35. return smalltalk.withContext(function($ctx1) { _st(aClass)._comment_(aString);
  36. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass}, smalltalk.HLEnvironment)})},
  37. messageSends: ["comment:"]}),
  38. smalltalk.HLEnvironment);
  39. smalltalk.addMethod(
  40. "_compileClassDefinition_",
  41. smalltalk.method({
  42. selector: "compileClassDefinition:",
  43. fn: function (aString){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) { _st(self)._eval_on_(aString,_st((smalltalk.DoIt || DoIt))._new());
  46. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString}, smalltalk.HLEnvironment)})},
  47. messageSends: ["eval:on:", "new"]}),
  48. smalltalk.HLEnvironment);
  49. smalltalk.addMethod(
  50. "_compileMethod_for_protocol_",
  51. smalltalk.method({
  52. selector: "compileMethod:for:protocol:",
  53. fn: function (sourceCode,class_,protocol){
  54. var self=this;
  55. return smalltalk.withContext(function($ctx1) { _st(class_)._compile_category_(sourceCode,protocol);
  56. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol}, smalltalk.HLEnvironment)})},
  57. messageSends: ["compile:category:"]}),
  58. smalltalk.HLEnvironment);
  59. smalltalk.addMethod(
  60. "_eval_on_",
  61. smalltalk.method({
  62. selector: "eval:on:",
  63. fn: function (someCode,aReceiver){
  64. var self=this;
  65. return smalltalk.withContext(function($ctx1) { var $1;
  66. $1=_st(self)._subclassResponsibility();
  67. return $1;
  68. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLEnvironment)})},
  69. messageSends: ["subclassResponsibility"]}),
  70. smalltalk.HLEnvironment);
  71. smalltalk.addMethod(
  72. "_packages",
  73. smalltalk.method({
  74. selector: "packages",
  75. fn: function (){
  76. var self=this;
  77. return smalltalk.withContext(function($ctx1) { var $1;
  78. $1=_st(self)._subclassResponsibility();
  79. return $1;
  80. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLEnvironment)})},
  81. messageSends: ["subclassResponsibility"]}),
  82. smalltalk.HLEnvironment);
  83. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  84. smalltalk.addMethod(
  85. "_classBuilder",
  86. smalltalk.method({
  87. selector: "classBuilder",
  88. fn: function (){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) { var $1;
  91. $1=_st((smalltalk.ClassBuilder || ClassBuilder))._new();
  92. return $1;
  93. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{}, smalltalk.HLLocalEnvironment)})},
  94. messageSends: ["new"]}),
  95. smalltalk.HLLocalEnvironment);
  96. smalltalk.addMethod(
  97. "_eval_on_",
  98. smalltalk.method({
  99. selector: "eval:on:",
  100. fn: function (aString,aReceiver){
  101. var self=this;
  102. var compiler;
  103. return smalltalk.withContext(function($ctx1) { var $1,$2;
  104. var $early={};
  105. try {
  106. compiler=_st((smalltalk.Compiler || Compiler))._new();
  107. _st((function(){
  108. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(aString);
  109. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  110. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  111. throw $early=[$1];
  112. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  113. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  114. return $2;
  115. }
  116. catch(e) {if(e===$early)return e[0]; throw e}
  117. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)})},
  118. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
  119. smalltalk.HLLocalEnvironment);
  120. smalltalk.addMethod(
  121. "_packages",
  122. smalltalk.method({
  123. selector: "packages",
  124. fn: function (){
  125. var self=this;
  126. return smalltalk.withContext(function($ctx1) { var $1;
  127. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
  128. return $1;
  129. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)})},
  130. messageSends: ["packages", "current"]}),
  131. smalltalk.HLLocalEnvironment);
  132. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  133. smalltalk.addMethod(
  134. "_eval_on_",
  135. smalltalk.method({
  136. selector: "eval:on:",
  137. fn: function (someCode,aReceiver){
  138. var self=this;
  139. return smalltalk.withContext(function($ctx1) { _st(self)._notYetImplemented();
  140. return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)})},
  141. messageSends: ["notYetImplemented"]}),
  142. smalltalk.HLRemoteEnvironment);
  143. smalltalk.addMethod(
  144. "_packages",
  145. smalltalk.method({
  146. selector: "packages",
  147. fn: function (){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)})},
  150. messageSends: []}),
  151. smalltalk.HLRemoteEnvironment);
  152. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  153. smalltalk.addMethod(
  154. "_doesNotUnderstand_",
  155. smalltalk.method({
  156. selector: "doesNotUnderstand:",
  157. fn: function (aMessage){
  158. var self=this;
  159. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)})},
  160. messageSends: []}),
  161. smalltalk.HLRemoteObject);
  162. smalltalk.addMethod(
  163. "_inspectOn_",
  164. smalltalk.method({
  165. selector: "inspectOn:",
  166. fn: function (anInspector){
  167. var self=this;
  168. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)})},
  169. messageSends: []}),
  170. smalltalk.HLRemoteObject);
  171. smalltalk.addMethod(
  172. "_printString",
  173. smalltalk.method({
  174. selector: "printString",
  175. fn: function (){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) { return "this is a remote object";
  178. }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)})},
  179. messageSends: []}),
  180. smalltalk.HLRemoteObject);