|
@@ -8,8 +8,8 @@ selector: "getBlock:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@getBlock"]=aBlock;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@getBlock"]=aBlock;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"getBlock:",{aBlock:aBlock}, smalltalk.EavModel)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "getBlock: aBlock\x0a\x0agetBlock := aBlock",
|
|
source: "getBlock: aBlock\x0a\x0agetBlock := aBlock",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -24,14 +24,14 @@ selector: "initialize",
|
|
category: 'initialization',
|
|
category: 'initialization',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
self["@getBlock"]=(function(){
|
|
self["@getBlock"]=(function(){
|
|
-return smalltalk.send(self,"_error_",["No getter block."]);
|
|
|
|
-});
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No getter block.");
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
|
self["@putBlock"]=(function(){
|
|
self["@putBlock"]=(function(){
|
|
-return smalltalk.send(self,"_error_",["No putter block."]);
|
|
|
|
-});
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._error_("No putter block.");
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.EavModel)})},
|
|
args: [],
|
|
args: [],
|
|
source: "initialize\x0a\x09super initialize.\x0a\x09getBlock := [ self error: 'No getter block.' ].\x0a\x09putBlock := [ self error: 'No putter block.' ].",
|
|
source: "initialize\x0a\x09super initialize.\x0a\x09getBlock := [ self error: 'No getter block.' ].\x0a\x09putBlock := [ self error: 'No putter block.' ].",
|
|
messageSends: ["initialize", "error:"],
|
|
messageSends: ["initialize", "error:"],
|
|
@@ -46,10 +46,10 @@ selector: "on:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(self["@getBlock"],"_value_",[anObject]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(self["@getBlock"])._value_(anObject);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.EavModel)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "on: anObject\x0a\x22Returns value of model applied on object\x22\x0a\x0a^getBlock value: anObject",
|
|
source: "on: anObject\x0a\x22Returns value of model applied on object\x22\x0a\x0a^getBlock value: anObject",
|
|
messageSends: ["value:"],
|
|
messageSends: ["value:"],
|
|
@@ -64,10 +64,10 @@ selector: "on:put:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject,anObject2){
|
|
fn: function (anObject,anObject2){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(self["@putBlock"],"_value_value_",[anObject,anObject2]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(self["@putBlock"])._value_value_(anObject,anObject2);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2}, smalltalk.EavModel)})},
|
|
args: ["anObject", "anObject2"],
|
|
args: ["anObject", "anObject2"],
|
|
source: "on: anObject put: anObject2\x0a\x22Puts a value via model applied on object\x22\x0a\x0a^putBlock value: anObject value: anObject2",
|
|
source: "on: anObject put: anObject2\x0a\x22Puts a value via model applied on object\x22\x0a\x0a^putBlock value: anObject value: anObject2",
|
|
messageSends: ["value:value:"],
|
|
messageSends: ["value:value:"],
|
|
@@ -82,8 +82,8 @@ selector: "putBlock:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@putBlock"]=aBlock;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@putBlock"]=aBlock;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"putBlock:",{aBlock:aBlock}, smalltalk.EavModel)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "putBlock: aBlock\x0a\x0aputBlock := aBlock",
|
|
source: "putBlock: aBlock\x0a\x0aputBlock := aBlock",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -102,9 +102,9 @@ category: 'action',
|
|
fn: function (anEavModel,aBlock){
|
|
fn: function (anEavModel,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
var newValue;
|
|
var newValue;
|
|
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(anEavModel,"_on_",[self])]);
|
|
|
|
-smalltalk.send(anEavModel,"_on_put_",[self,smalltalk.send(newValue,"_deepCopy",[])]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
newValue=_st(aBlock)._value_(_st(anEavModel)._on_(self));
|
|
|
|
+_st(anEavModel)._on_put_(self,_st(newValue)._deepCopy());
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"model:modify:",{anEavModel:anEavModel,aBlock:aBlock,newValue:newValue}, smalltalk.Isolator)})},
|
|
args: ["anEavModel", "aBlock"],
|
|
args: ["anEavModel", "aBlock"],
|
|
source: "model: anEavModel modify: aBlock\x0a\x0a| newValue |\x0anewValue := aBlock value: (anEavModel on: self).\x0aanEavModel on: self put: newValue deepCopy\x0a",
|
|
source: "model: anEavModel modify: aBlock\x0a\x0a| newValue |\x0anewValue := aBlock value: (anEavModel on: self).\x0aanEavModel on: self put: newValue deepCopy\x0a",
|
|
messageSends: ["value:", "on:", "on:put:", "deepCopy"],
|
|
messageSends: ["value:", "on:", "on:put:", "deepCopy"],
|
|
@@ -119,8 +119,8 @@ selector: "model:read:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (anEavModel,aBlock){
|
|
fn: function (anEavModel,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send(anEavModel,"_on_",[self]),"_deepCopy",[])]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(aBlock)._value_(_st(_st(anEavModel)._on_(self))._deepCopy());
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"model:read:",{anEavModel:anEavModel,aBlock:aBlock}, smalltalk.Isolator)})},
|
|
args: ["anEavModel", "aBlock"],
|
|
args: ["anEavModel", "aBlock"],
|
|
source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
|
|
source: "model: anEavModel read: aBlock\x0a\x0aaBlock value: (anEavModel on: self) deepCopy",
|
|
messageSends: ["value:", "deepCopy", "on:"],
|
|
messageSends: ["value:", "deepCopy", "on:"],
|
|
@@ -135,8 +135,10 @@ selector: "root",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return self["@root"];
|
|
|
|
-},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@root"];
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"root",{}, smalltalk.Isolator)})},
|
|
args: [],
|
|
args: [],
|
|
source: "root\x0a\x0a^root\x0a",
|
|
source: "root\x0a\x0a^root\x0a",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -151,8 +153,8 @@ selector: "root:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@root"]=anObject;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@root"]=anObject;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"root:",{anObject:anObject}, smalltalk.Isolator)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "root: anObject\x0a\x0aroot := anObject",
|
|
source: "root: anObject\x0a\x0aroot := anObject",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -168,10 +170,10 @@ selector: "on:",
|
|
category: 'instance creation',
|
|
category: 'instance creation',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_root_",[anObject]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(_st(self)._new())._root_(anObject);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject}, smalltalk.Isolator.klass)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "on: anObject\x0a^self new root: anObject",
|
|
source: "on: anObject\x0a^self new root: anObject",
|
|
messageSends: ["root:", "new"],
|
|
messageSends: ["root:", "new"],
|
|
@@ -189,19 +191,21 @@ selector: "changed:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (key){
|
|
fn: function (key){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
var needsToRun;
|
|
var needsToRun;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$2;
|
|
needsToRun=false;
|
|
needsToRun=false;
|
|
-smalltalk.send(self,"_do_",[(function(each){
|
|
|
|
-$1=smalltalk.send(each,"_accepts_",[key]);
|
|
|
|
-if(smalltalk.assert($1)){
|
|
|
|
-smalltalk.send(each,"_flag",[]);
|
|
|
|
|
|
+$1=self;
|
|
|
|
+$2=(function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._accepts_(key);
|
|
|
|
+if(smalltalk.assert($3)){
|
|
|
|
+_st(each)._flag();
|
|
needsToRun=true;
|
|
needsToRun=true;
|
|
return needsToRun;
|
|
return needsToRun;
|
|
};
|
|
};
|
|
-})]);
|
|
|
|
-smalltalk.send(self,"_dirty_",[needsToRun]);
|
|
|
|
-return self},
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
|
|
|
+_st($1)._do_($2);
|
|
|
|
+_st(self)._dirty_(needsToRun);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"changed:",{key:key,needsToRun:needsToRun}, smalltalk.KeyedPubSubBase)})},
|
|
args: ["key"],
|
|
args: ["key"],
|
|
source: "changed: key\x0a\x09| needsToRun |\x0a needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09(each accepts: key) ifTrue: [\x0a\x09\x09\x09each flag.\x0a needsToRun := true.\x0a\x09\x09]\x0a\x09].\x0a\x09self dirty: needsToRun",
|
|
source: "changed: key\x0a\x09| needsToRun |\x0a needsToRun := false.\x0a\x09self do: [ :each |\x0a\x09\x09(each accepts: key) ifTrue: [\x0a\x09\x09\x09each flag.\x0a needsToRun := true.\x0a\x09\x09]\x0a\x09].\x0a\x09self dirty: needsToRun",
|
|
messageSends: ["do:", "ifTrue:", "flag", "accepts:", "dirty:"],
|
|
messageSends: ["do:", "ifTrue:", "flag", "accepts:", "dirty:"],
|
|
@@ -216,12 +220,14 @@ selector: "dirty:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (aBoolean){
|
|
fn: function (aBoolean){
|
|
var self=this;
|
|
var self=this;
|
|
-if(smalltalk.assert(aBoolean)){
|
|
|
|
-smalltalk.send((function(){
|
|
|
|
-return smalltalk.send(self,"_run",[]);
|
|
|
|
-}),"_fork",[]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=aBoolean;
|
|
|
|
+if(smalltalk.assert($1)){
|
|
|
|
+_st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._run();
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._fork();
|
|
};
|
|
};
|
|
-return self},
|
|
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean}, smalltalk.KeyedPubSubBase)})},
|
|
args: ["aBoolean"],
|
|
args: ["aBoolean"],
|
|
source: "dirty: aBoolean\x0a\x09aBoolean ifTrue: [[ self run ] fork]",
|
|
source: "dirty: aBoolean\x0a\x09aBoolean ifTrue: [[ self run ] fork]",
|
|
messageSends: ["ifTrue:", "fork", "run"],
|
|
messageSends: ["ifTrue:", "fork", "run"],
|
|
@@ -236,9 +242,9 @@ selector: "on:hook:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (key,aBlock){
|
|
fn: function (key,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_add_",[smalltalk.send(smalltalk.send(self["@factory"],"_value_value_",[key,aBlock]),"_flag",[])]);
|
|
|
|
-smalltalk.send(self,"_dirty_",[true]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self)._add_(_st(_st(self["@factory"])._value_value_(key,aBlock))._flag());
|
|
|
|
+_st(self)._dirty_(true);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"on:hook:",{key:key,aBlock:aBlock}, smalltalk.KeyedPubSubBase)})},
|
|
args: ["key", "aBlock"],
|
|
args: ["key", "aBlock"],
|
|
source: "on: key hook: aBlock\x0a\x09self add: (factory value: key value: aBlock) flag.\x0a \x09self dirty: true",
|
|
source: "on: key hook: aBlock\x0a\x09self add: (factory value: key value: aBlock) flag.\x0a \x09self dirty: true",
|
|
messageSends: ["add:", "flag", "value:value:", "dirty:"],
|
|
messageSends: ["add:", "flag", "value:value:", "dirty:"],
|
|
@@ -253,24 +259,28 @@ selector: "run",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1,$2;
|
|
|
|
var needsClean;
|
|
var needsClean;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$5,$4,$2,$6;
|
|
needsClean=false;
|
|
needsClean=false;
|
|
-smalltalk.send(self,"_do_",[(function(each){
|
|
|
|
-$1=smalltalk.send(each,"_isFlagged",[]);
|
|
|
|
-if(smalltalk.assert($1)){
|
|
|
|
-smalltalk.send(each,"_run",[]);
|
|
|
|
-$2=smalltalk.send(each,"_isEnabled",[]);
|
|
|
|
-if(! smalltalk.assert($2)){
|
|
|
|
|
|
+$1=self;
|
|
|
|
+$2=(function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$3=_st(each)._isFlagged();
|
|
|
|
+$4=(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
_st(each)._run();
|
|
|
|
+$5=_st(each)._isEnabled();
|
|
|
|
+if(! smalltalk.assert($5)){
|
|
needsClean=true;
|
|
needsClean=true;
|
|
return needsClean;
|
|
return needsClean;
|
|
};
|
|
};
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})});
|
|
|
|
+return _st($3)._ifTrue_($4);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})});
|
|
|
|
+_st($1)._do_($2);
|
|
|
|
+$6=needsClean;
|
|
|
|
+if(smalltalk.assert($6)){
|
|
|
|
+_st(self)._clean();
|
|
};
|
|
};
|
|
-})]);
|
|
|
|
-if(smalltalk.assert(needsClean)){
|
|
|
|
-smalltalk.send(self,"_clean",[]);
|
|
|
|
-};
|
|
|
|
-return self},
|
|
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"run",{needsClean:needsClean}, smalltalk.KeyedPubSubBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "run\x0a\x09| needsClean |\x0a needsClean := false.\x0a\x09self do: [ :each |\x0a\x09\x09each isFlagged ifTrue: [\x0a each run.\x0a each isEnabled ifFalse: [ needsClean := true ]\x0a ]\x0a\x09].\x0a needsClean ifTrue: [ self clean ]",
|
|
source: "run\x0a\x09| needsClean |\x0a needsClean := false.\x0a\x09self do: [ :each |\x0a\x09\x09each isFlagged ifTrue: [\x0a each run.\x0a each isEnabled ifFalse: [ needsClean := true ]\x0a ]\x0a\x09].\x0a needsClean ifTrue: [ self clean ]",
|
|
messageSends: ["do:", "ifTrue:", "run", "ifFalse:", "isEnabled", "isFlagged", "clean"],
|
|
messageSends: ["do:", "ifTrue:", "run", "ifFalse:", "isEnabled", "isFlagged", "clean"],
|
|
@@ -285,8 +295,8 @@ selector: "subscriptionFactory:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@factory"]=aBlock;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@factory"]=aBlock;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"subscriptionFactory:",{aBlock:aBlock}, smalltalk.KeyedPubSubBase)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "subscriptionFactory: aBlock\x0a factory := aBlock",
|
|
source: "subscriptionFactory: aBlock\x0a factory := aBlock",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -304,8 +314,8 @@ selector: "add:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aSubscription){
|
|
fn: function (aSubscription){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self["@queue"],"_add_",[aSubscription]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self["@queue"])._add_(aSubscription);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"add:",{aSubscription:aSubscription}, smalltalk.SimpleKeyedPubSub)})},
|
|
args: ["aSubscription"],
|
|
args: ["aSubscription"],
|
|
source: "add: aSubscription\x0a\x09queue add: aSubscription.\x0a",
|
|
source: "add: aSubscription\x0a\x09queue add: aSubscription.\x0a",
|
|
messageSends: ["add:"],
|
|
messageSends: ["add:"],
|
|
@@ -320,10 +330,10 @@ selector: "clean",
|
|
category: 'bookkeeping',
|
|
category: 'bookkeeping',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@queue"]=smalltalk.send(self["@queue"],"_select_",[(function(each){
|
|
|
|
-return smalltalk.send(each,"_isEnabled",[]);
|
|
|
|
-})]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@queue"]=_st(self["@queue"])._select_((function(each){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(each)._isEnabled();
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"clean",{}, smalltalk.SimpleKeyedPubSub)})},
|
|
args: [],
|
|
args: [],
|
|
source: "clean\x0a\x09queue := queue select: [ :each | each isEnabled ]",
|
|
source: "clean\x0a\x09queue := queue select: [ :each | each isEnabled ]",
|
|
messageSends: ["select:", "isEnabled"],
|
|
messageSends: ["select:", "isEnabled"],
|
|
@@ -338,8 +348,8 @@ selector: "do:",
|
|
category: 'enumeration',
|
|
category: 'enumeration',
|
|
fn: function (aBlock){
|
|
fn: function (aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self["@queue"],"_do_",[aBlock]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self["@queue"])._do_(aBlock);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock}, smalltalk.SimpleKeyedPubSub)})},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
source: "do: aBlock\x0a\x09queue do: aBlock",
|
|
source: "do: aBlock\x0a\x09queue do: aBlock",
|
|
messageSends: ["do:"],
|
|
messageSends: ["do:"],
|
|
@@ -354,9 +364,9 @@ selector: "initialize",
|
|
category: 'initialization',
|
|
category: 'initialization',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_initialize",[],smalltalk.KeyedPubSubBase);
|
|
|
|
-self["@queue"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
smalltalk.KeyedPubSubBase.fn.prototype._initialize.apply(_st(self), []);
|
|
|
|
+self["@queue"]=_st((smalltalk.OrderedCollection || OrderedCollection))._new();
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.SimpleKeyedPubSub)})},
|
|
args: [],
|
|
args: [],
|
|
source: "initialize\x0a super initialize.\x0a\x09queue := OrderedCollection new",
|
|
source: "initialize\x0a super initialize.\x0a\x09queue := OrderedCollection new",
|
|
messageSends: ["initialize", "new"],
|
|
messageSends: ["initialize", "new"],
|
|
@@ -378,8 +388,8 @@ selector: "accepts:",
|
|
category: 'testing',
|
|
category: 'testing',
|
|
fn: function (aKey){
|
|
fn: function (aKey){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_subclassResponsibility",[]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self)._subclassResponsibility();
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: ["aKey"],
|
|
args: ["aKey"],
|
|
source: "accepts: aKey\x0a \x22Should return true if change for aKey is relevant for this subscription\x22\x0a self subclassResponsibility",
|
|
source: "accepts: aKey\x0a \x22Should return true if change for aKey is relevant for this subscription\x22\x0a self subclassResponsibility",
|
|
messageSends: ["subclassResponsibility"],
|
|
messageSends: ["subclassResponsibility"],
|
|
@@ -394,8 +404,8 @@ selector: "flag",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@flagged"]=true;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@flagged"]=true;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"flag",{}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "flag\x0a\x09flagged := true",
|
|
source: "flag\x0a\x09flagged := true",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -410,11 +420,11 @@ selector: "initialize",
|
|
category: 'initialization',
|
|
category: 'initialization',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_initialize",[],smalltalk.Object);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
|
|
self["@key"]=nil;
|
|
self["@key"]=nil;
|
|
self["@actionBlock"]=nil;
|
|
self["@actionBlock"]=nil;
|
|
self["@flagged"]=false;
|
|
self["@flagged"]=false;
|
|
-return self},
|
|
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "initialize\x0a\x09super initialize.\x0a key := nil.\x0a actionBlock := nil.\x0a flagged := false.",
|
|
source: "initialize\x0a\x09super initialize.\x0a key := nil.\x0a actionBlock := nil.\x0a flagged := false.",
|
|
messageSends: ["initialize"],
|
|
messageSends: ["initialize"],
|
|
@@ -429,10 +439,10 @@ selector: "isEnabled",
|
|
category: 'testing',
|
|
category: 'testing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(self["@actionBlock"],"_notNil",[]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(self["@actionBlock"])._notNil();
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isEnabled",{}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "isEnabled\x0a\x09^actionBlock notNil",
|
|
source: "isEnabled\x0a\x09^actionBlock notNil",
|
|
messageSends: ["notNil"],
|
|
messageSends: ["notNil"],
|
|
@@ -447,8 +457,10 @@ selector: "isFlagged",
|
|
category: 'testing',
|
|
category: 'testing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return self["@flagged"];
|
|
|
|
-},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@flagged"];
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isFlagged",{}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "isFlagged\x0a\x09^flagged",
|
|
source: "isFlagged\x0a\x09^flagged",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -463,9 +475,9 @@ selector: "key:block:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject,aBlock){
|
|
fn: function (anObject,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@key"]=anObject;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@key"]=anObject;
|
|
self["@actionBlock"]=aBlock;
|
|
self["@actionBlock"]=aBlock;
|
|
-return self},
|
|
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"key:block:",{anObject:anObject,aBlock:aBlock}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: ["anObject", "aBlock"],
|
|
args: ["anObject", "aBlock"],
|
|
source: "key: anObject block: aBlock\x0a\x09key := anObject.\x0a actionBlock := aBlock",
|
|
source: "key: anObject block: aBlock\x0a\x09key := anObject.\x0a actionBlock := aBlock",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -480,18 +492,18 @@ selector: "run",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send((function(){
|
|
|
|
-return smalltalk.send((function(){
|
|
|
|
-return smalltalk.send(self["@actionBlock"],"_value",[]);
|
|
|
|
-}),"_ensure_",[(function(){
|
|
|
|
-self["@flagged"]=false;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
return _st(self["@actionBlock"])._value();
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._ensure_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
self["@flagged"]=false;
|
|
return self["@flagged"];
|
|
return self["@flagged"];
|
|
-})]);
|
|
|
|
-}),"_on_do_",[(smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
|
|
|
|
-self["@actionBlock"]=nil;
|
|
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.KeyedPubSubUnsubscribe || KeyedPubSubUnsubscribe),(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
self["@actionBlock"]=nil;
|
|
return self["@actionBlock"];
|
|
return self["@actionBlock"];
|
|
-})]);
|
|
|
|
-return self},
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"run",{}, smalltalk.KeyedSubscriptionBase)})},
|
|
args: [],
|
|
args: [],
|
|
source: "run\x0a\x09[[ actionBlock value ] ensure: [ flagged := false ]]\x0a on: KeyedPubSubUnsubscribe do: [ actionBlock := nil ]",
|
|
source: "run\x0a\x09[[ actionBlock value ] ensure: [ flagged := false ]]\x0a on: KeyedPubSubUnsubscribe do: [ actionBlock := nil ]",
|
|
messageSends: ["on:do:", "ensure:", "value"],
|
|
messageSends: ["on:do:", "ensure:", "value"],
|
|
@@ -509,12 +521,12 @@ selector: "accepts:",
|
|
category: 'testing',
|
|
category: 'testing',
|
|
fn: function (aKey){
|
|
fn: function (aKey){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(smalltalk.send(smalltalk.send(aKey,"_size",[]),"__lt_eq",[smalltalk.send(self["@key"],"_size",[])]),"_and_",[(function(){
|
|
|
|
-return smalltalk.send(aKey,"__eq",[smalltalk.send(self["@key"],"_copyFrom_to_",[(1),smalltalk.send(aKey,"_size",[])])]);
|
|
|
|
-})]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(_st(_st(aKey)._size()).__lt_eq(_st(self["@key"])._size()))._and_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(aKey).__eq(_st(self["@key"])._copyFrom_to_((1),_st(aKey)._size()));
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"accepts:",{aKey:aKey}, smalltalk.ListKeyedSubscription)})},
|
|
args: ["aKey"],
|
|
args: ["aKey"],
|
|
source: "accepts: aKey\x0a ^aKey size <= key size and: [aKey = (key copyFrom: 1 to: aKey size)]",
|
|
source: "accepts: aKey\x0a ^aKey size <= key size and: [aKey = (key copyFrom: 1 to: aKey size)]",
|
|
messageSends: ["and:", "=", "copyFrom:to:", "size", "<="],
|
|
messageSends: ["and:", "=", "copyFrom:to:", "size", "<="],
|
|
@@ -533,8 +545,10 @@ selector: "dispatcher",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-return self["@dispatcher"];
|
|
|
|
-},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=self["@dispatcher"];
|
|
|
|
+return $1;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"dispatcher",{}, smalltalk.ListKeyedEntity)})},
|
|
args: [],
|
|
args: [],
|
|
source: "dispatcher\x0a\x09^dispatcher",
|
|
source: "dispatcher\x0a\x09^dispatcher",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -549,16 +563,17 @@ selector: "dispatcher:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (aDispatcher){
|
|
fn: function (aDispatcher){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1,$2,$3;
|
|
|
|
-smalltalk.send(aDispatcher,"_subscriptionFactory_",[(function(key,block){
|
|
|
|
-$1=smalltalk.send((smalltalk.ListKeyedSubscription || ListKeyedSubscription),"_new",[]);
|
|
|
|
-smalltalk.send($1,"_key_block_",[key,block]);
|
|
|
|
-$2=smalltalk.send($1,"_yourself",[]);
|
|
|
|
-return $2;
|
|
|
|
-})]);
|
|
|
|
-$3=smalltalk.send(aDispatcher,"_yourself",[]);
|
|
|
|
-self["@dispatcher"]=$3;
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3,$4;
|
|
|
|
+$1=aDispatcher;
|
|
|
|
+_st($1)._subscriptionFactory_((function(key,block){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$2=_st((smalltalk.ListKeyedSubscription || ListKeyedSubscription))._new();
|
|
|
|
+_st($2)._key_block_(key,block);
|
|
|
|
+$3=_st($2)._yourself();
|
|
|
|
+return $3;
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({key:key,block:block},$ctx1)})}));
|
|
|
|
+$4=_st($1)._yourself();
|
|
|
|
+self["@dispatcher"]=$4;
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"dispatcher:",{aDispatcher:aDispatcher}, smalltalk.ListKeyedEntity)})},
|
|
args: ["aDispatcher"],
|
|
args: ["aDispatcher"],
|
|
source: "dispatcher: aDispatcher\x0a\x09dispatcher := aDispatcher\x0a subscriptionFactory: [ :key :block | ListKeyedSubscription new key: key block: block; yourself ];\x0a yourself",
|
|
source: "dispatcher: aDispatcher\x0a\x09dispatcher := aDispatcher\x0a subscriptionFactory: [ :key :block | ListKeyedSubscription new key: key block: block; yourself ];\x0a yourself",
|
|
messageSends: ["subscriptionFactory:", "key:block:", "new", "yourself"],
|
|
messageSends: ["subscriptionFactory:", "key:block:", "new", "yourself"],
|
|
@@ -573,9 +588,9 @@ selector: "model:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-self["@payload"]=anObject;
|
|
|
|
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[[]]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
self["@payload"]=anObject;
|
|
|
|
+_st(_st(self)._dispatcher())._changed_([]);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedEntity)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "model: anObject\x0a\x09payload := anObject.\x0a self dispatcher changed: #()",
|
|
source: "model: anObject\x0a\x09payload := anObject.\x0a self dispatcher changed: #()",
|
|
messageSends: ["changed:", "dispatcher"],
|
|
messageSends: ["changed:", "dispatcher"],
|
|
@@ -590,10 +605,10 @@ selector: "watch:do:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_on_hook_",[path,(function(){
|
|
|
|
-return smalltalk.send(self,"_read_do_",[path,aBlock]);
|
|
|
|
-})]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(_st(self)._dispatcher())._on_hook_(path,(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self)._read_do_(path,aBlock);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"watch:do:",{path:path,aBlock:aBlock}, smalltalk.ListKeyedEntity)})},
|
|
args: ["path", "aBlock"],
|
|
args: ["path", "aBlock"],
|
|
source: "watch: path do: aBlock\x0a\x09self dispatcher on: path hook: [ self read: path do: aBlock ]\x0a",
|
|
source: "watch: path do: aBlock\x0a\x09self dispatcher on: path hook: [ self read: path do: aBlock ]\x0a",
|
|
messageSends: ["on:hook:", "read:do:", "dispatcher"],
|
|
messageSends: ["on:hook:", "read:do:", "dispatcher"],
|
|
@@ -612,16 +627,15 @@ selector: "modify:do:",
|
|
category: 'action',
|
|
category: 'action',
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
-var newValue;
|
|
|
|
-var eavModel;
|
|
|
|
-eavModel=smalltalk.send(path,"_asEavModel",[]);
|
|
|
|
-newValue=smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
|
|
|
|
-smalltalk.send((function(){
|
|
|
|
-return smalltalk.send(eavModel,"_on_put_",[self["@payload"],newValue]);
|
|
|
|
-}),"_ensure_",[(function(){
|
|
|
|
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
|
|
|
|
-})]);
|
|
|
|
-return self},
|
|
|
|
|
|
+var newValue,eavModel;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
eavModel=_st(path)._asEavModel();
|
|
|
|
+newValue=_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
|
|
|
|
+_st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(eavModel)._on_put_(self["@payload"],newValue);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,newValue:newValue,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})},
|
|
args: ["path", "aBlock"],
|
|
args: ["path", "aBlock"],
|
|
source: "modify: path do: aBlock\x0a | newValue eavModel |\x0a eavModel := path asEavModel.\x0a newValue := aBlock value: (eavModel on: payload).\x0a [ eavModel on: payload put: newValue ] ensure: [ self dispatcher changed: path ]\x0a",
|
|
source: "modify: path do: aBlock\x0a | newValue eavModel |\x0a eavModel := path asEavModel.\x0a newValue := aBlock value: (eavModel on: payload).\x0a [ eavModel on: payload put: newValue ] ensure: [ self dispatcher changed: path ]\x0a",
|
|
messageSends: ["asEavModel", "value:", "on:", "ensure:", "changed:", "dispatcher", "on:put:"],
|
|
messageSends: ["asEavModel", "value:", "on:", "ensure:", "changed:", "dispatcher", "on:put:"],
|
|
@@ -637,9 +651,9 @@ category: 'action',
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
-eavModel=smalltalk.send(path,"_asEavModel",[]);
|
|
|
|
-smalltalk.send(aBlock,"_value_",[smalltalk.send(eavModel,"_on_",[self["@payload"]])]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
eavModel=_st(path)._asEavModel();
|
|
|
|
+_st(aBlock)._value_(_st(eavModel)._on_(self["@payload"]));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedDirectEntity)})},
|
|
args: ["path", "aBlock"],
|
|
args: ["path", "aBlock"],
|
|
source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := path asEavModel.\x0a aBlock value: (eavModel on: payload)\x0a",
|
|
source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := path asEavModel.\x0a aBlock value: (eavModel on: payload)\x0a",
|
|
messageSends: ["asEavModel", "value:", "on:"],
|
|
messageSends: ["asEavModel", "value:", "on:"],
|
|
@@ -658,8 +672,8 @@ selector: "model:",
|
|
category: 'accessing',
|
|
category: 'accessing',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_model_",[smalltalk.send((smalltalk.Isolator || Isolator),"_on_",[anObject])],smalltalk.ListKeyedEntity);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
smalltalk.ListKeyedEntity.fn.prototype._model_.apply(_st(self), [_st((smalltalk.Isolator || Isolator))._on_(anObject)]);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject}, smalltalk.ListKeyedIsolatedEntity)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
|
|
source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
|
|
messageSends: ["model:", "on:"],
|
|
messageSends: ["model:", "on:"],
|
|
@@ -675,13 +689,13 @@ category: 'action',
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
|
|
|
|
-smalltalk.send((function(){
|
|
|
|
-return smalltalk.send(self["@payload"],"_model_modify_",[eavModel,aBlock]);
|
|
|
|
-}),"_ensure_",[(function(){
|
|
|
|
-return smalltalk.send(smalltalk.send(self,"_dispatcher",[]),"_changed_",[path]);
|
|
|
|
-})]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
|
|
|
|
+_st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(self["@payload"])._model_modify_(eavModel,aBlock);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(_st(self)._dispatcher())._changed_(path);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})},
|
|
args: ["path", "aBlock"],
|
|
args: ["path", "aBlock"],
|
|
source: "modify: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]\x0a",
|
|
source: "modify: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a [ payload model: eavModel modify: aBlock ] ensure: [ self dispatcher changed: path ]\x0a",
|
|
messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"],
|
|
messageSends: ["asEavModel", ",", "ensure:", "changed:", "dispatcher", "model:modify:"],
|
|
@@ -697,9 +711,9 @@ category: 'action',
|
|
fn: function (path,aBlock){
|
|
fn: function (path,aBlock){
|
|
var self=this;
|
|
var self=this;
|
|
var eavModel;
|
|
var eavModel;
|
|
-eavModel=smalltalk.send(smalltalk.send([smalltalk.symbolFor("root")],"__comma",[path]),"_asEavModel",[]);
|
|
|
|
-smalltalk.send(self["@payload"],"_model_read_",[eavModel,aBlock]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
eavModel=_st(_st([smalltalk.symbolFor("root")]).__comma(path))._asEavModel();
|
|
|
|
+_st(self["@payload"])._model_read_(eavModel,aBlock);
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel}, smalltalk.ListKeyedIsolatedEntity)})},
|
|
args: ["path", "aBlock"],
|
|
args: ["path", "aBlock"],
|
|
source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a payload model: eavModel read: aBlock\x0a",
|
|
source: "read: path do: aBlock\x0a | eavModel |\x0a eavModel := ({#root},path) asEavModel.\x0a payload model: eavModel read: aBlock\x0a",
|
|
messageSends: ["asEavModel", ",", "model:read:"],
|
|
messageSends: ["asEavModel", ",", "model:read:"],
|
|
@@ -716,8 +730,8 @@ selector: "reverseTrapAt:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-return nil;
|
|
|
|
-},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
return nil;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Object)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "reverseTrapAt: anObject\x0a\x09^nil",
|
|
source: "reverseTrapAt: anObject\x0a\x09^nil",
|
|
messageSends: [],
|
|
messageSends: [],
|
|
@@ -732,8 +746,8 @@ selector: "reverseTrapAt:put:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject,value){
|
|
fn: function (anObject,value){
|
|
var self=this;
|
|
var self=this;
|
|
-smalltalk.send(self,"_error_",[smalltalk.send(smalltalk.send("Trapped cannot put at ","__comma",[smalltalk.send(smalltalk.send(self,"_class",[]),"_name",[])]),"__comma",[" type key."])]);
|
|
|
|
-return self},
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
_st(self)._error_(_st(_st("Trapped cannot put at ").__comma(_st(_st(self)._class())._name())).__comma(" type key."));
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Object)})},
|
|
args: ["anObject", "value"],
|
|
args: ["anObject", "value"],
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09self error: 'Trapped cannot put at ', self class name, ' type key.'",
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09self error: 'Trapped cannot put at ', self class name, ' type key.'",
|
|
messageSends: ["error:", ",", "name", "class"],
|
|
messageSends: ["error:", ",", "name", "class"],
|
|
@@ -748,35 +762,49 @@ selector: "asEavModel",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
var model;
|
|
var model;
|
|
-model=smalltalk.send((smalltalk.EavModel || EavModel),"_new",[]);
|
|
|
|
-smalltalk.send(model,"_getBlock_",[(function(anObject){
|
|
|
|
-return smalltalk.send(self,"_inject_into_",[anObject,(function(soFar,segment){
|
|
|
|
-if(($receiver = soFar) == nil || $receiver == undefined){
|
|
|
|
-return soFar;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$3,$4,$6,$5,$2,$7,$9,$11,$12,$14,$13,$10,$8,$15;
|
|
|
|
+model=_st((smalltalk.EavModel || EavModel))._new();
|
|
|
|
+$1=model;
|
|
|
|
+$2=(function(anObject){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$3=self;
|
|
|
|
+$4=anObject;
|
|
|
|
+$5=(function(soFar,segment){
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
$6=soFar;
|
|
|
|
+if(($receiver = $6) == nil || $receiver == undefined){
|
|
|
|
+return $6;
|
|
} else {
|
|
} else {
|
|
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
|
|
|
|
|
|
+return _st(segment)._reverseTrapAt_(soFar);
|
|
};
|
|
};
|
|
-})]);
|
|
|
|
-})]);
|
|
|
|
-$1=smalltalk.send(self,"_isEmpty",[]);
|
|
|
|
-if(! smalltalk.assert($1)){
|
|
|
|
-smalltalk.send(model,"_putBlock_",[(function(anObject,value){
|
|
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
|
|
|
|
+return _st($3)._inject_into_($4,$5);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1)})});
|
|
|
|
+_st($1)._getBlock_($2);
|
|
|
|
+$7=_st(self)._isEmpty();
|
|
|
|
+$8=(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
$9=model;
|
|
|
|
+$10=(function(anObject,value){
|
|
var penultimate;
|
|
var penultimate;
|
|
-penultimate=smalltalk.send(smalltalk.send(self,"_allButLast",[]),"_inject_into_",[anObject,(function(soFar,segment){
|
|
|
|
-if(($receiver = soFar) == nil || $receiver == undefined){
|
|
|
|
-return soFar;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx3) {
$11=_st(self)._allButLast();
|
|
|
|
+$12=anObject;
|
|
|
|
+$13=(function(soFar,segment){
|
|
|
|
+return smalltalk.withContext(function($ctx4) {
$14=soFar;
|
|
|
|
+if(($receiver = $14) == nil || $receiver == undefined){
|
|
|
|
+return $14;
|
|
} else {
|
|
} else {
|
|
-return smalltalk.send(segment,"_reverseTrapAt_",[soFar]);
|
|
|
|
|
|
+return _st(segment)._reverseTrapAt_(soFar);
|
|
};
|
|
};
|
|
-})]);
|
|
|
|
|
|
+}, function($ctx4) {$ctx4.fillBlock({soFar:soFar,segment:segment},$ctx1)})});
|
|
|
|
+penultimate=_st($11)._inject_into_($12,$13);
|
|
penultimate;
|
|
penultimate;
|
|
-return smalltalk.send(smalltalk.send(self,"_last",[]),"_reverseTrapAt_put_",[penultimate,value]);
|
|
|
|
-})]);
|
|
|
|
-};
|
|
|
|
-return model;
|
|
|
|
-},
|
|
|
|
|
|
+return _st(_st(self)._last())._reverseTrapAt_put_(penultimate,value);
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1)})});
|
|
|
|
+return _st($9)._putBlock_($10);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
|
|
|
|
+_st($7)._ifFalse_($8);
|
|
|
|
+$15=model;
|
|
|
|
+return $15;
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model}, smalltalk.SequenceableCollection)})},
|
|
args: [],
|
|
args: [],
|
|
source: "asEavModel\x0a | model |\x0a model := EavModel new.\x0a model getBlock: [ :anObject |\x0a self inject: anObject into: [ :soFar :segment |\x0a soFar ifNotNil: [ segment reverseTrapAt: soFar ]]].\x0a self isEmpty ifFalse: [\x0a model putBlock: [ :anObject :value | | penultimate |\x0a penultimate := self allButLast inject: anObject into: [ :soFar :segment |\x0a soFar ifNotNil: [ segment reverseTrapAt: soFar ]].\x0a self last reverseTrapAt: penultimate put: value ]].\x0a ^model",
|
|
source: "asEavModel\x0a | model |\x0a model := EavModel new.\x0a model getBlock: [ :anObject |\x0a self inject: anObject into: [ :soFar :segment |\x0a soFar ifNotNil: [ segment reverseTrapAt: soFar ]]].\x0a self isEmpty ifFalse: [\x0a model putBlock: [ :anObject :value | | penultimate |\x0a penultimate := self allButLast inject: anObject into: [ :soFar :segment |\x0a soFar ifNotNil: [ segment reverseTrapAt: soFar ]].\x0a self last reverseTrapAt: penultimate put: value ]].\x0a ^model",
|
|
messageSends: ["new", "getBlock:", "inject:into:", "ifNotNil:", "reverseTrapAt:", "ifFalse:", "putBlock:", "allButLast", "reverseTrapAt:put:", "last", "isEmpty"],
|
|
messageSends: ["new", "getBlock:", "inject:into:", "ifNotNil:", "reverseTrapAt:", "ifFalse:", "putBlock:", "allButLast", "reverseTrapAt:put:", "last", "isEmpty"],
|
|
@@ -791,12 +819,12 @@ selector: "reverseTrapAt:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
|
|
|
|
-return nil;
|
|
|
|
-})]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return nil;
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.String)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
messageSends: ["at:ifAbsent:"],
|
|
messageSends: ["at:ifAbsent:"],
|
|
@@ -811,10 +839,10 @@ selector: "reverseTrapAt:put:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject,value){
|
|
fn: function (anObject,value){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(anObject)._at_put_(self,value);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.String)})},
|
|
args: ["anObject", "value"],
|
|
args: ["anObject", "value"],
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
messageSends: ["at:put:"],
|
|
messageSends: ["at:put:"],
|
|
@@ -829,18 +857,18 @@ selector: "reverseTrapAt:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
var $early={};
|
|
var $early={};
|
|
try {
|
|
try {
|
|
-$1=smalltalk.send((function(){
|
|
|
|
-return smalltalk.send(anObject,"_perform_",[self]);
|
|
|
|
-}),"_on_do_",[(smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
|
|
|
|
-throw $early=[nil];
|
|
|
|
-})]);
|
|
|
|
|
|
+$1=_st((function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return _st(anObject)._perform_(self);
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.MessageNotUnderstood || MessageNotUnderstood),(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
throw $early=[nil];
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
return $1;
|
|
return $1;
|
|
}
|
|
}
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
catch(e) {if(e===$early)return e[0]; throw e}
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Symbol)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "reverseTrapAt: anObject\x0a\x09^[anObject perform: self] on: MessageNotUnderstood do: [^nil]",
|
|
source: "reverseTrapAt: anObject\x0a\x09^[anObject perform: self] on: MessageNotUnderstood do: [^nil]",
|
|
messageSends: ["on:do:", "perform:"],
|
|
messageSends: ["on:do:", "perform:"],
|
|
@@ -855,10 +883,10 @@ selector: "reverseTrapAt:put:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject,value){
|
|
fn: function (anObject,value){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(anObject,"_perform_withArguments_",[smalltalk.send(smalltalk.send(self,"__comma",[":"]),"_asSymbol",[]),[value]]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(anObject)._perform_withArguments_(_st(_st(self).__comma(":"))._asSymbol(),[value]);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Symbol)})},
|
|
args: ["anObject", "value"],
|
|
args: ["anObject", "value"],
|
|
source: "reverseTrapAt: anObject put: value\x0a ^anObject perform: (self, ':') asSymbol withArguments: { value }",
|
|
source: "reverseTrapAt: anObject put: value\x0a ^anObject perform: (self, ':') asSymbol withArguments: { value }",
|
|
messageSends: ["perform:withArguments:", "asSymbol", ","],
|
|
messageSends: ["perform:withArguments:", "asSymbol", ","],
|
|
@@ -873,12 +901,12 @@ selector: "reverseTrapAt:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject){
|
|
fn: function (anObject){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(anObject,"_at_ifAbsent_",[self,(function(){
|
|
|
|
-return nil;
|
|
|
|
-})]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(anObject)._at_ifAbsent_(self,(function(){
|
|
|
|
+return smalltalk.withContext(function($ctx2) {
return nil;
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject}, smalltalk.Number)})},
|
|
args: ["anObject"],
|
|
args: ["anObject"],
|
|
source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
messageSends: ["at:ifAbsent:"],
|
|
messageSends: ["at:ifAbsent:"],
|
|
@@ -893,10 +921,10 @@ selector: "reverseTrapAt:put:",
|
|
category: '*Trapped-Backend',
|
|
category: '*Trapped-Backend',
|
|
fn: function (anObject,value){
|
|
fn: function (anObject,value){
|
|
var self=this;
|
|
var self=this;
|
|
-var $1;
|
|
|
|
-$1=smalltalk.send(anObject,"_at_put_",[self,value]);
|
|
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1;
|
|
|
|
+$1=_st(anObject)._at_put_(self,value);
|
|
return $1;
|
|
return $1;
|
|
-},
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:put:",{anObject:anObject,value:value}, smalltalk.Number)})},
|
|
args: ["anObject", "value"],
|
|
args: ["anObject", "value"],
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
source: "reverseTrapAt: anObject put: value\x0a\x09^anObject at: self put: value",
|
|
messageSends: ["at:put:"],
|
|
messageSends: ["at:put:"],
|