123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- smalltalk.addPackage('Helios-Environments');
- smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode,aReceiver){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self)._subclassResponsibility();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLEnvironment)})},
- messageSends: ["subclassResponsibility"]}),
- smalltalk.HLEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(self)._subclassResponsibility();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLEnvironment)})},
- messageSends: ["subclassResponsibility"]}),
- smalltalk.HLEnvironment);
- smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode,aReceiver){
- var self=this;
- var compiler;
- return smalltalk.withContext(function($ctx1) {
var $1,$2;
- var $early={};
- try {
- compiler=_st((smalltalk.Compiler || Compiler))._new();
- _st((function(){
- return smalltalk.withContext(function($ctx2) {
return _st(compiler)._parseExpression_(someCode);
- }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
- return smalltalk.withContext(function($ctx2) {
$1=_st(window)._alert_(_st(ex)._messageText());
- throw $early=[$1];
- }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
- $2=_st(_st(_st(compiler)._eval_(_st(compiler)._compile_forClass_(_st(_st("doIt ^[").__comma(someCode)).__comma("] value"),(smalltalk.DoIt || DoIt))))._fn())._applyTo_arguments_(aReceiver,[]);
- return $2;
- }
- catch(e) {if(e===$early)return e[0]; throw e}
- }, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver,compiler:compiler}, smalltalk.HLLocalEnvironment)})},
- messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ","]}),
- smalltalk.HLLocalEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
var $1;
- $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packages();
- return $1;
- }, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLLocalEnvironment)})},
- messageSends: ["packages", "current"]}),
- smalltalk.HLLocalEnvironment);
- smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode,aReceiver){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
_st(self)._notYetImplemented();
- return self}, function($ctx1) {$ctx1.fill(self,"eval:on:",{someCode:someCode,aReceiver:aReceiver}, smalltalk.HLRemoteEnvironment)})},
- messageSends: ["notYetImplemented"]}),
- smalltalk.HLRemoteEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"packages",{}, smalltalk.HLRemoteEnvironment)})},
- messageSends: []}),
- smalltalk.HLRemoteEnvironment);
- smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_doesNotUnderstand_",
- smalltalk.method({
- selector: "doesNotUnderstand:",
- fn: function (aMessage){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage}, smalltalk.HLRemoteObject)})},
- messageSends: []}),
- smalltalk.HLRemoteObject);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- fn: function (anInspector){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector}, smalltalk.HLRemoteObject)})},
- messageSends: []}),
- smalltalk.HLRemoteObject);
- smalltalk.addMethod(
- "_printString",
- smalltalk.method({
- selector: "printString",
- fn: function (){
- var self=this;
- return smalltalk.withContext(function($ctx1) {
return "this is a remote object";
- }, function($ctx1) {$ctx1.fill(self,"printString",{}, smalltalk.HLRemoteObject)})},
- messageSends: []}),
- smalltalk.HLRemoteObject);
|