Browse Source

`self._value()` when `self()` was before

Herbert Vojčík 11 years ago
parent
commit
55a7a09bbe
3 changed files with 12 additions and 12 deletions
  1. 3 3
      js/Kernel-Methods.deploy.js
  2. 6 6
      js/Kernel-Methods.js
  3. 3 3
      st/Kernel-Methods.st

+ 3 - 3
js/Kernel-Methods.deploy.js

@@ -56,7 +56,7 @@ selector: "ensure:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-try{return self()}finally{aBlock._value()};
+try{return self._value()}finally{aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 messageSends: []}),
 smalltalk.BlockClosure);
@@ -302,7 +302,7 @@ selector: "whileFalse:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-while(!self()) {aBlock._value()};
+while(!smalltalk.assert(self._value())) {aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"whileFalse:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 messageSends: []}),
 smalltalk.BlockClosure);
@@ -326,7 +326,7 @@ selector: "whileTrue:",
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-while(self()) {aBlock._value()};
+while(smalltalk.assert(self._value())) {aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"whileTrue:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 messageSends: []}),
 smalltalk.BlockClosure);

+ 6 - 6
js/Kernel-Methods.js

@@ -78,10 +78,10 @@ category: 'evaluating',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-try{return self()}finally{aBlock._value()};
+try{return self._value()}finally{aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 args: ["aBlock"],
-source: "ensure: aBlock\x0a\x09<try{return self()}finally{aBlock._value()}>",
+source: "ensure: aBlock\x0a\x09<try{return self._value()}finally{aBlock._value()}>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -419,10 +419,10 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-while(!self()) {aBlock._value()};
+while(!smalltalk.assert(self._value())) {aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"whileFalse:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 args: ["aBlock"],
-source: "whileFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(!self()) {aBlock._value()}>",
+source: "whileFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(!smalltalk.assert(self._value())) {aBlock._value()}>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -453,10 +453,10 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-while(self()) {aBlock._value()};
+while(smalltalk.assert(self._value())) {aBlock._value()};
 return self}, function($ctx1) {$ctx1.fill(self,"whileTrue:",{aBlock:aBlock},smalltalk.BlockClosure)})},
 args: ["aBlock"],
-source: "whileTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(self()) {aBlock._value()}>",
+source: "whileTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(smalltalk.assert(self._value())) {aBlock._value()}>",
 messageSends: [],
 referencedClasses: []
 }),

+ 3 - 3
st/Kernel-Methods.st

@@ -49,7 +49,7 @@ whileFalse
 
 whileFalse: aBlock
 	"inlined in the Compiler"
-	<while(!!self()) {aBlock._value()}>
+	<while(!!smalltalk.assert(self._value())) {aBlock._value()}>
 !
 
 whileTrue
@@ -59,7 +59,7 @@ whileTrue
 
 whileTrue: aBlock
 	"inlined in the Compiler"
-	<while(self()) {aBlock._value()}>
+	<while(smalltalk.assert(self._value())) {aBlock._value()}>
 ! !
 
 !BlockClosure methodsFor: 'converting'!
@@ -103,7 +103,7 @@ applyTo: anObject arguments: aCollection
 !
 
 ensure: aBlock
-	<try{return self()}finally{aBlock._value()}>
+	<try{return self._value()}finally{aBlock._value()}>
 !
 
 new