Ver código fonte

Return unboxed version of the receiver with #value instead of #yourself

Nicolas Petton 11 anos atrás
pai
commit
017c99d09c
3 arquivos alterados com 22 adições e 18 exclusões
  1. 9 7
      js/Kernel-Objects.deploy.js
  2. 11 9
      js/Kernel-Objects.js
  3. 2 2
      st/Kernel-Objects.st

+ 9 - 7
js/Kernel-Objects.deploy.js

@@ -673,10 +673,11 @@ smalltalk.addMethod(
 "_value",
 smalltalk.method({
 selector: "value",
-fn: function () {
-    var self = this;
-    return self;
-}
+fn: function (){
+var self=this;
+return self.valueOf();
+;
+return self}
 }),
 smalltalk.Object);
 
@@ -686,9 +687,10 @@ smalltalk.method({
 selector: "yourself",
 fn: function (){
 var self=this;
-return self.valueOf();
-;
-return self}
+var $1;
+$1=self;
+return $1;
+}
 }),
 smalltalk.Object);
 

+ 11 - 9
js/Kernel-Objects.js

@@ -935,12 +935,13 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "value",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self;
-},
+fn: function (){
+var self=this;
+return self.valueOf();
+;
+return self},
 args: [],
-source: "value\x0a\x09^ self",
+source: "value\x0a\x09<return self.valueOf()>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -953,11 +954,12 @@ selector: "yourself",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self.valueOf();
-;
-return self},
+var $1;
+$1=self;
+return $1;
+},
 args: [],
-source: "yourself\x0a\x09<return self.valueOf()>",
+source: "yourself\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),

+ 2 - 2
st/Kernel-Objects.st

@@ -84,11 +84,11 @@ size
 !
 
 value
-	^ self
+	<return self.valueOf()>
 !
 
 yourself
-	<return self.valueOf()>
+	^ self
 ! !
 
 !Object methodsFor: 'comparing'!