Merge jv
authorHG Automerge
Thu, 22 Dec 2016 23:00:47 +0000
branchjv
changeset 21246 958aa6e341d4
parent 21245 4a39cfd57230 (current diff)
parent 21157 c4dc25f898da (diff)
child 21247 9ee1206fc247
Merge
MD5Stream.st
Magnitude.st
Method.st
SHA1Stream.st
SmallInteger.st
--- a/MD5Stream.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/MD5Stream.st	Thu Dec 22 23:00:47 2016 +0000
@@ -67,6 +67,7 @@
 
 
     performance: roughly
+                          150 Mb/s on a 2007 MAC Powerbook (2.6Ghz I7-Duo)
                        104000 Kb/s on a 2.5Ghz 64X2 Athlon 4800+ (64bit)
                         80000 Kb/s on a 2Ghz Duo
                         27200 Kb/s on a 1.2Ghz Athlon
--- a/Magnitude.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/Magnitude.st	Thu Dec 22 23:00:47 2016 +0000
@@ -39,7 +39,7 @@
 documentation
 "
     This is an abstract class definining common methods for
-    Objects which can be compared by a kind of less than relation.
+    Objects which can be compared by a kind of less-than relation.
 
     [author:]
         Claus Gittinger
--- a/Method.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/Method.st	Thu Dec 22 23:00:47 2016 +0000
@@ -1059,6 +1059,7 @@
     "Modified (format): / 18-11-2011 / 14:47:06 / cg"
 ! !
 
+
 !Method methodsFor:'accessing-visibility'!
 
 isIgnored
@@ -1980,7 +1981,8 @@
     classAndSelector notNil ifTrue:[
         (classAndSelector methodClass) name printOn:aStream.
         "/ print out in a form that can directly be evaluated (>> is a selector in Behavior)
-        "/ aStream nextPutAll:'  '.
+        "/ in order to not break existing code which parses those strings,
+        "/ do not replace '>>' by '  '
         aStream nextPutAll:' >> '.
         (classAndSelector methodSelector) printOn:aStream.
     ] ifFalse:[
@@ -2027,6 +2029,27 @@
     "
 
     "Modified: 1.11.1996 / 16:27:04 / cg"
+!
+
+whoStringWith:sep
+    "return a string like className>>selector, 
+     if this is not an unbound method.
+     Otherwise return 'unbound'. Used with debugging."
+
+    |who|
+
+    who := self who.
+    who notNil ifTrue:[
+        ^ who methodClass name , sep , (who methodSelector storeString)
+    ].
+    ^ 'unboundMethod'
+
+    "
+     Method new whoStringWith:' >> '
+     (Method compiledMethodAt:#whoString) whoStringWith:' >> '
+     (Method compiledMethodAt:#whoString) whoStringWith:'  '
+     (Method compiledMethodAt:#whoString) whoStringWith:' -> '
+    "
 ! !
 
 !Method methodsFor:'private'!
@@ -3760,6 +3783,7 @@
     "Created: / 23-07-2012 / 11:16:36 / cg"
 ! !
 
+
 !Method methodsFor:'source management'!
 
 revisionInfo
--- a/SHA1Stream.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/SHA1Stream.st	Thu Dec 22 23:00:47 2016 +0000
@@ -312,29 +312,30 @@
     This may be used as checksum or for generating cryptographic signatures.
 
     Notice (2005):
-	Be aware that SHA-1 is considered broken and may not be appropriate in some applications.
-	Especially it should no longer be used for security stuff.
+        Be aware that SHA-1 is considered broken and may not be appropriate in some applications.
+        Especially it should no longer be used for security stuff.
 
     performance: roughly
-	  120400 Kb/s on a 2.5Ghz 64X2 Athlon 4800+ (64bit)
-	   47400 Kb/s on a 2Ghz Duo (old measure)
-	    9580 Kb/s on a 400Mhz PIII
-	    3970 Kb/s on a 300Mhz Sparc
+          150 Mb/s on a 2007 MAC Powerbook (2.6Ghz I7-Duo)
+          120400 Kb/s on a 2.5Ghz 64X2 Athlon 4800+ (64bit)
+           47400 Kb/s on a 2Ghz Duo (old measure)
+            9580 Kb/s on a 400Mhz PIII
+            3970 Kb/s on a 300Mhz Sparc
 
     [author:]
-	Stefan Vogel
+        Stefan Vogel
 
     [see also:]
-	MD5Stream
-	SHA256Stream SHA512Stream (in libcrypt)
+        MD5Stream
+        SHA256Stream SHA512Stream (in libcrypt)
 
     [class variables:]
-	HashSize        size of returned hash value
-	ContextSize     (implementation) size of hash context
+        HashSize        size of returned hash value
+        ContextSize     (implementation) size of hash context
 
     [instance variables:]
-	hashContext     (implementation)
-			internal buffer for computation of the hash value
+        hashContext     (implementation)
+                        internal buffer for computation of the hash value
 "
 !
 
--- a/SmallInteger.st	Tue Dec 20 10:11:20 2016 +0000
+++ b/SmallInteger.st	Thu Dec 22 23:00:47 2016 +0000
@@ -51,8 +51,9 @@
 
     These are no real objects - they have no instances (not even storage !!)
     and cannot be subclassed.
-    The reason is to save both storage and runtime by not collecting
-    SmallIntegers in the system. SmallInts are marked by having the TAG_INT
+    The reason is to save both storage and runtime by not boxing and
+    garbage collecting SmallIntegers in the system. 
+    SmallInts are marked by having the TAG_INT
     bit set, in contrast to all other objects which do not.
     Since this knowledge is hardwired into the system (and there is no
     class-field stored with SmallIntegers) there can be no subclass of
@@ -61,6 +62,12 @@
     If you really need this kind of thing, create a subclass of Integer,
     with an instance variable holding the value.
 
+    Because the range and sharing of SmallIntegers is different among implementations
+    (both in different dialects, and in different architectures within the Smalltalk/X family),
+    you should not depend on the identity of two integers with the same value.
+    For portable code, when comparing integers, use #'=' and #'~=' (instead of #'==' / #'~~'), 
+    unless you are comparing very small integers in the -1024 .. 0 .. 1024 range.
+
     [author:]
         Claus Gittinger
 
@@ -209,7 +216,6 @@
     "Modified: 23.4.1996 / 16:00:33 / cg"
 ! !
 
-
 !SmallInteger methodsFor:'arithmetic'!
 
 * aNumber
@@ -962,6 +968,7 @@
 ! !
 
 
+
 !SmallInteger methodsFor:'bit operators'!
 
 bitAnd:anInteger