|
@@ -2781,18 +2781,21 @@ smalltalk.addMethod(
|
|
smalltalk.method({
|
|
smalltalk.method({
|
|
selector: "timesRepeat:",
|
|
selector: "timesRepeat:",
|
|
category: 'enumerating',
|
|
category: 'enumerating',
|
|
-fn: function (aBlock) {
|
|
+fn: function (aBlock){
|
|
- var self = this;
|
|
+var self=this;
|
|
- var integer;
|
|
+var count;
|
|
- var count;
|
|
+count=(1);
|
|
- integer = smalltalk.send(self, "_truncated", []);
|
|
+smalltalk.send((function(){
|
|
- count = 1;
|
|
+return smalltalk.send(count,"__gt",[self]);
|
|
- smalltalk.send(function () {return smalltalk.send(count, "__gt", [self]);}, "_whileFalse_", [function () {smalltalk.send(aBlock, "_value", []);count = smalltalk.send(count, "__plus", [1]);return count;}]);
|
|
+}),"_whileFalse_",[(function(){
|
|
- return self;
|
|
+smalltalk.send(aBlock,"_value",[]);
|
|
-},
|
|
+count=smalltalk.send(count,"__plus",[(1)]);
|
|
|
|
+return count;
|
|
|
|
+})]);
|
|
|
|
+return self},
|
|
args: ["aBlock"],
|
|
args: ["aBlock"],
|
|
-source: "timesRepeat: aBlock\x0a\x09| integer count |\x0a\x09integer := self truncated.\x0a\x09count := 1.\x0a\x09[count > self] whileFalse: [\x0a\x09 aBlock value.\x0a\x09 count := count + 1]",
|
|
+source: "timesRepeat: aBlock\x0a\x09| count |\x0a\x09count := 1.\x0a\x09[count > self] whileFalse: [\x0a\x09 aBlock value.\x0a\x09 count := count + 1]",
|
|
-messageSends: ["truncated", "whileFalse:", "value", "+", ">"],
|
|
+messageSends: ["whileFalse:", "value", "+", ">"],
|
|
referencedClasses: []
|
|
referencedClasses: []
|
|
}),
|
|
}),
|
|
smalltalk.Number);
|
|
smalltalk.Number);
|