|
@@ -842,15 +842,19 @@ fn: function (anObject){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1;
|
|
|
+if(($receiver = anObject) == nil || $receiver == null){
|
|
|
+$1=anObject;
|
|
|
+} else {
|
|
|
$1=_st(anObject)._at_ifAbsent_(self,(function(){
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
return nil;
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
|
+};
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.Number)})},
|
|
|
args: ["anObject"],
|
|
|
-source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
|
-messageSends: ["at:ifAbsent:"],
|
|
|
+source: "reverseTrapAt: anObject\x0a\x09^anObject ifNotNil: [ anObject at: self ifAbsent: [nil] ]",
|
|
|
+messageSends: ["ifNotNil:", "at:ifAbsent:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Number);
|
|
@@ -888,12 +892,8 @@ _st(model)._getBlock_((function(anObject){
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
return self._inject_into_(anObject,(function(soFar,segment){
|
|
|
return smalltalk.withContext(function($ctx3) {
|
|
|
-if(($receiver = soFar) == nil || $receiver == null){
|
|
|
-return soFar;
|
|
|
-} else {
|
|
|
return _st(segment)._reverseTrapAt_(soFar);
|
|
|
$ctx3.sendIdx["reverseTrapAt:"]=1;
|
|
|
-};
|
|
|
}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx2,2)})}));
|
|
|
$ctx2.sendIdx["inject:into:"]=1;
|
|
|
}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1,1)})}));
|
|
@@ -909,17 +909,17 @@ return soFar;
|
|
|
} else {
|
|
|
return _st(segment)._reverseTrapAt_(soFar);
|
|
|
};
|
|
|
-}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx2,6)})}));
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({soFar:soFar,segment:segment},$ctx2,5)})}));
|
|
|
penultimate;
|
|
|
return _st(self._last())._reverseTrapAt_put_(penultimate,value);
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1,5)})}));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value,penultimate:penultimate},$ctx1,4)})}));
|
|
|
};
|
|
|
$2=model;
|
|
|
return $2;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model},smalltalk.SequenceableCollection)})},
|
|
|
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",
|
|
|
-messageSends: ["new", "getBlock:", "inject:into:", "ifNotNil:", "reverseTrapAt:", "ifFalse:", "isEmpty", "putBlock:", "allButLast", "reverseTrapAt:put:", "last"],
|
|
|
+source: "asEavModel\x0a | model |\x0a model := EavModel new.\x0a model getBlock: [ :anObject |\x0a self inject: anObject into: [ :soFar :segment |\x0a 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:", "reverseTrapAt:", "ifFalse:", "isEmpty", "putBlock:", "allButLast", "ifNotNil:", "reverseTrapAt:put:", "last"],
|
|
|
referencedClasses: ["EavModel"]
|
|
|
}),
|
|
|
smalltalk.SequenceableCollection);
|
|
@@ -932,15 +932,19 @@ fn: function (anObject){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1;
|
|
|
+if(($receiver = anObject) == nil || $receiver == null){
|
|
|
+$1=anObject;
|
|
|
+} else {
|
|
|
$1=_st(anObject)._at_ifAbsent_(self,(function(){
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
return nil;
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
|
|
|
+};
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"reverseTrapAt:",{anObject:anObject},smalltalk.String)})},
|
|
|
args: ["anObject"],
|
|
|
-source: "reverseTrapAt: anObject\x0a\x09^anObject at: self ifAbsent: [nil]",
|
|
|
-messageSends: ["at:ifAbsent:"],
|
|
|
+source: "reverseTrapAt: anObject\x0a\x09^anObject ifNotNil: [ anObject at: self ifAbsent: [nil] ]",
|
|
|
+messageSends: ["ifNotNil:", "at:ifAbsent:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.String);
|