Helios-Environments.deploy.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. smalltalk.addPackage('Helios-Environments');
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
  3. smalltalk.addMethod(
  4. "_eval_on_",
  5. smalltalk.method({
  6. selector: "eval:on:",
  7. fn: function (someCode,aReceiver){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=_st(self)._subclassResponsibility();
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLEnvironment)})},
  13. messageSends: ["subclassResponsibility"]}),
  14. smalltalk.HLEnvironment);
  15. smalltalk.addMethod(
  16. "_packages",
  17. smalltalk.method({
  18. selector: "packages",
  19. fn: function (){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { var $1;
  22. $1=_st(self)._subclassResponsibility();
  23. return $1;
  24. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLEnvironment)})},
  25. messageSends: ["subclassResponsibility"]}),
  26. smalltalk.HLEnvironment);
  27. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  28. smalltalk.addMethod(
  29. "_eval_on_",
  30. smalltalk.method({
  31. selector: "eval:on:",
  32. fn: function (someCode,aReceiver){
  33. var self=this;
  34. var compiler;
  35. return smalltalk.withContext(function($ctx1) { var $1,$2;
  36. var $early={};
  37. try {
  38. compiler=_st((smalltalk.Compiler || Compiler))._new();
  39. _st((function(){
  40. return smalltalk.withContext(function($ctx2) { return _st(compiler)._parseExpression_(someCode);
  41. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
  42. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  43. throw $early=[$1];
  44. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  45. $2=_st(_st(_st(compiler)._eval_(_st(compiler)._compile_forClass_(_st(_st("doIt ^[").__comma(someCode)).__comma("] value"),(smalltalk.DoIt || DoIt))))._fn())._applyTo_arguments_(aReceiver,[]);
  46. return $2;
  47. }
  48. catch(e) {if(e===$early)return e[0]; throw e}
  49. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)})},
  50. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ","]}),
  51. smalltalk.HLLocalEnvironment);
  52. smalltalk.addMethod(
  53. "_packages",
  54. smalltalk.method({
  55. selector: "packages",
  56. fn: function (){
  57. var self=this;
  58. return smalltalk.withContext(function($ctx1) { var $1;
  59. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
  60. return $1;
  61. }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)})},
  62. messageSends: ["packages", "current"]}),
  63. smalltalk.HLLocalEnvironment);
  64. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  65. smalltalk.addMethod(
  66. "_eval_on_",
  67. smalltalk.method({
  68. selector: "eval:on:",
  69. fn: function (someCode,aReceiver){
  70. var self=this;
  71. return smalltalk.withContext(function($ctx1) { _st(self)._notYetImplemented();
  72. return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)})},
  73. messageSends: ["notYetImplemented"]}),
  74. smalltalk.HLRemoteEnvironment);
  75. smalltalk.addMethod(
  76. "_packages",
  77. smalltalk.method({
  78. selector: "packages",
  79. fn: function (){
  80. var self=this;
  81. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)})},
  82. messageSends: []}),
  83. smalltalk.HLRemoteEnvironment);
  84. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  85. smalltalk.addMethod(
  86. "_doesNotUnderstand_",
  87. smalltalk.method({
  88. selector: "doesNotUnderstand:",
  89. fn: function (aMessage){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)})},
  92. messageSends: []}),
  93. smalltalk.HLRemoteObject);
  94. smalltalk.addMethod(
  95. "_inspectOn_",
  96. smalltalk.method({
  97. selector: "inspectOn:",
  98. fn: function (anInspector){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)})},
  101. messageSends: []}),
  102. smalltalk.HLRemoteObject);
  103. smalltalk.addMethod(
  104. "_printString",
  105. smalltalk.method({
  106. selector: "printString",
  107. fn: function (){
  108. var self=this;
  109. return smalltalk.withContext(function($ctx1) { return "this is a remote object";
  110. }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)})},
  111. messageSends: []}),
  112. smalltalk.HLRemoteObject);