|
@@ -1813,11 +1813,11 @@ var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
var index = self._positionOfKey_(aKey);
|
|
|
- return index >=0 ? self['@values'][index] : aBlock();
|
|
|
+ return index >=0 ? self['@values'][index] : aBlock._value();
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.Dictionary)})},
|
|
|
args: ["aKey", "aBlock"],
|
|
|
-source: "at: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09return index >>=0 ? self['@values'][index] : aBlock();\x0a\x09>",
|
|
|
+source: "at: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09return index >>=0 ? self['@values'][index] : aBlock._value();\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -1996,7 +1996,7 @@ return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
var index = self._positionOfKey_(aKey);
|
|
|
if(index === -1) {
|
|
|
- return aBlock()
|
|
|
+ return aBlock._value()
|
|
|
} else {
|
|
|
var keys = self['@keys'], values = self['@values'];
|
|
|
var value = values[index], l = keys.length;
|
|
@@ -2009,7 +2009,7 @@ return smalltalk.withContext(function($ctx1) {
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"removeKey:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.Dictionary)})},
|
|
|
args: ["aKey", "aBlock"],
|
|
|
-source: "removeKey: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09return aBlock()\x0a\x09\x09} else {\x0a\x09\x09\x09var keys = self['@keys'], values = self['@values'];\x0a\x09\x09\x09var value = values[index], l = keys.length;\x0a\x09\x09\x09keys[index] = keys[l-1];\x0a\x09\x09\x09keys.pop();\x0a\x09\x09\x09values[index] = values[l-1];\x0a\x09\x09\x09values.pop();\x0a\x09\x09\x09return value;\x0a\x09\x09}\x0a\x09>",
|
|
|
+source: "removeKey: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09return aBlock._value()\x0a\x09\x09} else {\x0a\x09\x09\x09var keys = self['@keys'], values = self['@values'];\x0a\x09\x09\x09var value = values[index], l = keys.length;\x0a\x09\x09\x09keys[index] = keys[l-1];\x0a\x09\x09\x09keys.pop();\x0a\x09\x09\x09values[index] = values[l-1];\x0a\x09\x09\x09values.pop();\x0a\x09\x09\x09return value;\x0a\x09\x09}\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2218,13 +2218,13 @@ var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
for(var i = 0; i < self.length; i++)
|
|
|
- if(aBlock(self[i]))
|
|
|
+ if(aBlock._value_(self[i]))
|
|
|
return self[i];
|
|
|
- return anotherBlock();
|
|
|
+ return anotherBlock._value();
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"detect:ifNone:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["aBlock", "anotherBlock"],
|
|
|
-source: "detect: aBlock ifNone: anotherBlock\x0a\x09<\x0a\x09\x09for(var i = 0; i < self.length; i++)\x0a\x09\x09\x09if(aBlock(self[i]))\x0a\x09\x09\x09\x09return self[i];\x0a\x09\x09return anotherBlock();\x0a\x09>",
|
|
|
+source: "detect: aBlock ifNone: anotherBlock\x0a\x09<\x0a\x09\x09for(var i = 0; i < self.length; i++)\x0a\x09\x09\x09if(aBlock._value_(self[i]))\x0a\x09\x09\x09\x09return self[i];\x0a\x09\x09return anotherBlock._value();\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2237,10 +2237,10 @@ category: 'enumerating',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-for(var i=0;i<self.length;i++){aBlock(self[i]);};
|
|
|
+for(var i=0;i<self.length;i++){aBlock._value_(self[i]);};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["aBlock"],
|
|
|
-source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i]);}>",
|
|
|
+source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock._value_(self[i]);}>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2349,11 +2349,11 @@ return smalltalk.withContext(function($ctx1) {
|
|
|
for(var i=0;i<self.length;i++) {
|
|
|
if(self[i].__eq(anObject)) {return i+1}
|
|
|
};
|
|
|
- return aBlock();
|
|
|
+ return aBlock._value();
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"indexOf:ifAbsent:",{anObject:anObject,aBlock:aBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["anObject", "aBlock"],
|
|
|
-source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock();\x0a\x09>",
|
|
|
+source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=0;i<self.length;i++) {\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock._value();\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2391,11 +2391,11 @@ return smalltalk.withContext(function($ctx1) {
|
|
|
for(var i=start-1;i<self.length;i++){
|
|
|
if(self[i].__eq(anObject)) {return i+1}
|
|
|
}
|
|
|
- return aBlock();
|
|
|
+ return aBlock._value();
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"indexOf:startingAt:ifAbsent:",{anObject:anObject,start:start,aBlock:aBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["anObject", "start", "aBlock"],
|
|
|
-source: "indexOf: anObject startingAt: start ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=start-1;i<self.length;i++){\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09}\x0a\x09\x09return aBlock();\x0a\x09>",
|
|
|
+source: "indexOf: anObject startingAt: start ifAbsent: aBlock\x0a\x09<\x0a\x09\x09for(var i=start-1;i<self.length;i++){\x0a\x09\x09\x09if(self[i].__eq(anObject)) {return i+1}\x0a\x09\x09}\x0a\x09\x09return aBlock._value();\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2590,10 +2590,10 @@ category: 'enumerating',
|
|
|
fn: function (anotherCollection,aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-for(var i=0;i<self.length;i++){aBlock(self[i], anotherCollection[i]);};
|
|
|
+for(var i=0;i<self.length;i++){aBlock._value_value_(self[i], anotherCollection[i]);};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"with:do:",{anotherCollection:anotherCollection,aBlock:aBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["anotherCollection", "aBlock"],
|
|
|
-source: "with: anotherCollection do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i], anotherCollection[i]);}>",
|
|
|
+source: "with: anotherCollection do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock._value_value_(self[i], anotherCollection[i]);}>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2606,10 +2606,10 @@ category: 'enumerating',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
|
|
|
+for(var i=0;i<self.length;i++){aBlock._value_value_(self[i], i+1);};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.SequenceableCollection)})},
|
|
|
args: ["aBlock"],
|
|
|
-source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self[i], i+1);}>",
|
|
|
+source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock._value_value_(self[i], i+1);}>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2722,12 +2722,12 @@ fn: function (anIndex,aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
- if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};
|
|
|
+ if((anIndex < 1) || (self.length < anIndex)) {return aBlock._value()};
|
|
|
return self[anIndex - 1];
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.Array)})},
|
|
|
args: ["anIndex", "aBlock"],
|
|
|
-source: "at: anIndex ifAbsent: aBlock\x0a\x09<\x0a\x09\x09if((anIndex < 1) || (self.length < anIndex)) {return aBlock()};\x0a\x09\x09return self[anIndex - 1];\x0a\x09>",
|
|
|
+source: "at: anIndex ifAbsent: aBlock\x0a\x09<\x0a\x09\x09if((anIndex < 1) || (self.length < anIndex)) {return aBlock._value()};\x0a\x09\x09return self[anIndex - 1];\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -2905,12 +2905,12 @@ var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
|
|
|
return self.sort(function(a, b) {
|
|
|
- if(aBlock(a,b)) {return -1} else {return 1}
|
|
|
+ if(aBlock._value_value_(a,b)) {return -1} else {return 1}
|
|
|
})
|
|
|
;
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"sort:",{aBlock:aBlock},smalltalk.Array)})},
|
|
|
args: ["aBlock"],
|
|
|
-source: "sort: aBlock\x0a\x09<\x0a\x09\x09return self.sort(function(a, b) {\x0a\x09\x09\x09if(aBlock(a,b)) {return -1} else {return 1}\x0a\x09\x09})\x0a\x09>",
|
|
|
+source: "sort: aBlock\x0a\x09<\x0a\x09\x09return self.sort(function(a, b) {\x0a\x09\x09\x09if(aBlock._value_value_(a,b)) {return -1} else {return 1}\x0a\x09\x09})\x0a\x09>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -3590,10 +3590,10 @@ category: 'accessing',
|
|
|
fn: function (anIndex,aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-return String(self).charAt(anIndex - 1) || aBlock();
|
|
|
+return String(self).charAt(anIndex - 1) || aBlock._value();
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{anIndex:anIndex,aBlock:aBlock},smalltalk.String)})},
|
|
|
args: ["anIndex", "aBlock"],
|
|
|
-source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self).charAt(anIndex - 1) || aBlock()>",
|
|
|
+source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self).charAt(anIndex - 1) || aBlock._value()>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -3694,10 +3694,10 @@ category: 'enumerating',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-for(var i=0;i<self.length;i++){aBlock(self.charAt(i));};
|
|
|
+for(var i=0;i<self.length;i++){aBlock._value_(self.charAt(i));};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.String)})},
|
|
|
args: ["aBlock"],
|
|
|
-source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i));}>",
|
|
|
+source: "do: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock._value_(self.charAt(i));}>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -4286,10 +4286,10 @@ category: 'enumerating',
|
|
|
fn: function (aBlock){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);};
|
|
|
+for(var i=0;i<self.length;i++){aBlock._value_value_(self.charAt(i), i+1);};
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"withIndexDo:",{aBlock:aBlock},smalltalk.String)})},
|
|
|
args: ["aBlock"],
|
|
|
-source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock(self.charAt(i), i+1);}>",
|
|
|
+source: "withIndexDo: aBlock\x0a\x09<for(var i=0;i<self.length;i++){aBlock._value_value_(self.charAt(i), i+1);}>",
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|