Merge jv
authorMerge Script
Mon, 21 Mar 2016 06:42:17 +0100
branchjv
changeset 3960 3343243e9f6e
parent 3955 6d8e6ba24af4 (current diff)
parent 3959 cced41a33ec7 (diff)
child 3962 4149b6e7bc69
Merge
ChangeSet.st
ClassCategoryChange.st
MessageTracer.st
--- a/.hgtags	Fri Mar 04 15:45:32 2016 +0000
+++ b/.hgtags	Mon Mar 21 06:42:17 2016 +0100
@@ -58,6 +58,7 @@
 d13a0331a314493ae885147b0ce078237a020f4f expecco_2_6_0rc1
 d9e330efeb37db6f4d1a9c6fbd3ec45b434e1ea8 expecco_2_8_0
 d9e330efeb37db6f4d1a9c6fbd3ec45b434e1ea8 expecco_2_8_0a
+d9e330efeb37db6f4d1a9c6fbd3ec45b434e1ea8 expecco_2_8_0b
 d9e330efeb37db6f4d1a9c6fbd3ec45b434e1ea8 expecco_ALM_1_9_5
 d9e330efeb37db6f4d1a9c6fbd3ec45b434e1ea8 expecco_ALM_1_9_6
 dc4631f41200ce800997a780c37a23eec9a87c0e expecco_2_7_0
--- a/ChangeSet.st	Fri Mar 04 15:45:32 2016 +0000
+++ b/ChangeSet.st	Mon Mar 21 06:42:17 2016 +0100
@@ -790,6 +790,7 @@
     "Created: / 27.10.1997 / 13:52:54 / cg"
 ! !
 
+
 !ChangeSet class methodsFor:'Compatibility-VW'!
 
 component: component definition: anObject change: changeSymbol
@@ -2616,43 +2617,104 @@
     attributes := OrderedCollection new.
 
     [
-	inputStream skipSeparators.
-	category := inputStream nextChunk.
-	category notEmptyOrNil
+        inputStream skipSeparators.
+        category := inputStream nextChunk.
+        category notEmptyOrNil
     ] whileTrue:[
-	( #( 'public' 'private' ) includes: category) ifTrue:[
-	    attributes add:category
-	] ifFalse:[
-	    categories add:category
-	].
+        ( #( 'public' 'private' ) includes: category) ifTrue:[
+            attributes add:category
+        ] ifFalse:[
+            categories add:category
+        ].
+    ].
+    categories notEmpty ifTrue:[
+        categories size == 1 ifTrue:[
+            category := categories first.
+        ] ifFalse:[
+            category := categories asStringWith:' and '
+        ].    
+        change := MethodCategoryChange
+                        className:className
+                        selector:selector
+                        source:(parseTree printString)
+                        category:category.
+        self addChange:change.
+    ].
+    
+    attributes notEmpty ifTrue:[
+        attributes size == 1 ifTrue:[
+            "/ easy
+            (attributes first = 'public') ifTrue:[
+                "/ default anyway - ignore
+            ] ifFalse:[
+                change := MethodPrivacyChange
+                            className:className
+                            selector:selector
+                            privacy:(attributes first asSymbol).
+                change nameSpaceOverride:nameSpaceOverride.
+                change source:(parseTree printString).
+                self addChange:change.
+            ].
+        ] ifFalse:[
+            self halt:'multiple/missing attributes not supported'.
+        ].
     ].
-    categories size == 1 ifTrue:[
-	"/ easy
-	change := MethodCategoryChange
-			className:className
-			selector:selector
-			source:(parseTree printString)
-			category:(categories first).
-	self addChange:change.
-    ] ifFalse:[
-	self halt:'multiple/missing categories not supported'.
+    ^ true
+
+    "Modified: / 11-06-2013 / 16:11:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+handleCategoriesForClassChange
+    |category categories attributes change|
+
+    className := self receiversClassNameRememberingNamespace.
+
+    categories := OrderedCollection new.
+    attributes := OrderedCollection new.
+
+    [
+        inputStream skipSeparators.
+        category := inputStream nextChunk.
+        category notEmptyOrNil
+    ] whileTrue:[
+        ( #( 'public' 'private' ) includes: category) ifTrue:[
+            attributes add:category
+        ] ifFalse:[
+            categories add:category
+        ].
     ].
 
-    attributes size == 1 ifTrue:[
-	"/ easy
-	(attributes first = 'public') ifTrue:[
-	    "/ default anyway - ignore
-	] ifFalse:[
-	    change := MethodPrivacyChange
-			className:className
-			selector:selector
-			privacy:(attributes first asSymbol).
-	    change nameSpaceOverride:nameSpaceOverride.
-	    change source:(parseTree printString).
-	    self addChange:change.
-	].
-    ] ifFalse:[
-	self halt:'multiple/missing attributes not supported'.
+    categories notEmpty ifTrue:[
+        categories size == 1 ifTrue:[
+            "/ easy
+            category := categories first
+        ] ifFalse:[
+            category := categories asStringWith:' and '
+        ].    
+        change := ClassCategoryChange new
+                            className:className
+                            category:category.
+        self addChange:change.
+    ].
+
+    attributes notEmpty ifTrue:[
+        attributes size == 1 ifTrue:[
+            "/ easy
+            (attributes first = 'public') ifTrue:[
+                "/ default anyway - ignore
+            ] ifFalse:[
+                "/ a private class!!
+"/            change := ClassDefinitionChange
+"/                        className:className
+"/                        selector:selector
+"/                        privacy:(attributes first asSymbol).
+"/            change nameSpaceOverride:nameSpaceOverride.
+"/            change source:(parseTree printString).
+"/            self addChange:change.
+            ].
+        ] ifFalse:[
+            self halt:'multiple/missing attributes not supported'.
+        ].
     ].
     ^ true
 
@@ -3188,24 +3250,6 @@
     ^ self handleClassInstanceVariableDefinitionChange.
 !
 
-process_methods
-    "'methods' chunk (ST/V and dolphin)"
-
-    ^ self handleMethodChange.
-!
-
-process_methodsFor
-    "'methodsFor' chunk (ST/V and dolphin)"
-
-    ^ self handleMethodChange.
-!
-
-process_methodsFor_
-    "'methodsFor:' chunk (ST/80, Squeak, ST/X, VW, ...)"
-
-    ^ self handleMethodChange.
-!
-
 process_name_
     "'name:' chunk (ST/X)"
 
@@ -3405,18 +3449,42 @@
 
 !ChangeSet::ChangeFileReader methodsFor:'reading-private-dolphin'!
 
+process_categoriesForClass
+    "'categoriesForClass' chunk (Dolphin)"
+
+    ^ self handleCategoriesForClassChange.
+!
+
 process_categoriesFor_
     "'categoriesFor:' chunk (Dolphin)"
 
     ^ self handleCategoriesForChange.
 !
 
+process_methods
+    "'methods' chunk (ST/V and dolphin)"
+
+    ^ self handleMethodChange.
+!
+
+process_methodsFor
+    "'methodsFor' chunk (ST/V and dolphin)"
+
+    ^ self handleMethodChange.
+!
+
 process_methodsForUndefined_
     "'methodsForUndefined:' chunk (?)"
 
     ^ self handleMethodChange.
 !
 
+process_methodsFor_
+    "'methodsFor:' chunk (ST/80, Squeak, ST/X, VW, ...)"
+
+    ^ self handleMethodChange.
+!
+
 process_publicMethods
     "'publicMethods' chunk (ST/V and dolphin)"
 
--- a/ClassCategoryChange.st	Fri Mar 04 15:45:32 2016 +0000
+++ b/ClassCategoryChange.st	Mon Mar 21 06:42:17 2016 +0100
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic3' }"
 
+"{ NameSpace: Smalltalk }"
+
 ClassChange subclass:#ClassCategoryChange
 	instanceVariableNames:'category'
 	classVariableNames:''
@@ -85,14 +87,18 @@
     "append a user printed representation of the receiver to aStream.
      The format is suitable for a human - not meant to be read back."
 
-    aStream nextPutAll:className; nextPutAll:' category:'
+    aStream 
+        nextPutAll:className; 
+        nextPutAll:' category:';
+        nextPutAll:(category storeString)
 !
 
 printWithoutClassNameOn:aStream
     (className endsWith:' class') ifTrue:[
         aStream nextPutAll:'class '
     ].
-    aStream nextPutAll:'category:'
+    aStream nextPutAll:'category:'.
+    aStream nextPutAll:category storeString
 ! !
 
 !ClassCategoryChange methodsFor:'testing'!
@@ -112,6 +118,6 @@
 !ClassCategoryChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassCategoryChange.st,v 1.6 2014-02-19 13:05:23 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/MessageTracer.st	Fri Mar 04 15:45:32 2016 +0000
+++ b/MessageTracer.st	Mon Mar 21 06:42:17 2016 +0100
@@ -538,7 +538,7 @@
     "evaluate aBlock sending trace information to stdout.
      Return the value of the block."
 
-     ^ self trace:aBlock on:Stderr
+     ^ self trace:aBlock on:Processor activeProcess stderr
 
     "
      MessageTracer trace:[#(6 5 4 3 2 1) sort]
@@ -563,7 +563,7 @@
      Return the value of the block.
      The trace information is more detailed."
 
-     ^ self traceFull:aBlock on:Stderr
+     ^ self traceFull:aBlock on:Processor activeProcess stderr
 
     "
      MessageTracer traceFull:[#(6 5 4 3 2 1) sort]
@@ -589,7 +589,7 @@
      Return the value of the block.
      The trace information is more detailed."
 
-     ^ self traceFullIndented:aBlock on:Stderr
+     ^ self traceFullIndented:aBlock on:Processor activeProcess stderr
 
     "
      MessageTracer traceFullIndented:[ #(6 5 4 3 2 1) sort ]
@@ -614,7 +614,7 @@
     "evaluate aBlock sending trace information to stdout.
      Return the value of the block."
 
-     ^ self traceIndented:aBlock on:Stderr
+     ^ self traceIndented:aBlock on:Processor activeProcess stderr
 
     "
      MessageTracer traceIndented:[ #(6 5 4 3 2 1) sort ]
@@ -1686,7 +1686,7 @@
     "arrange for a trace message to be output on Stderr, when a message with aSelector is
      sent to instances of aClass (or subclass instances). Use untraceClass to remove this."
 
-    self traceClass:aClass selector:aSelector on:Stderr
+    self traceClass:aClass selector:aSelector on:Processor activeProcess stderr
 
     "
      MessageTracer traceClass:Integer selector:#factorial.
@@ -1730,7 +1730,7 @@
      when aMethod is executed. Traces both entry and exit.
      Use unwrapMethod to remove this."
 
-    ^ self traceMethod:aMethod on:Stderr
+    ^ self traceMethod:aMethod on:Processor activeProcess stderr
 
     "
      MessageTracer traceMethod:(Integer compiledMethodAt:#factorial).
@@ -1828,7 +1828,7 @@
      when aMethod is executed. Only entry is traced.
      Use unwrapMethod to remove this."
 
-    ^ self traceMethodEntry:aMethod on:Stderr
+    ^ self traceMethodEntry:aMethod on:Processor activeProcess stderr
 
     "
      MessageTracer traceMethodEntry:(Integer compiledMethodAt:#factorial).
@@ -1894,7 +1894,7 @@
      Only the sender is traced on entry.
      Use untraceMethod to remove this trace."
 
-    ^ self traceMethodFull:aMethod on:Stderr
+    ^ self traceMethodFull:aMethod on:Processor activeProcess stderr
 
     "Created: 15.12.1995 / 18:19:31 / cg"
     "Modified: 22.10.1996 / 17:39:28 / cg"
@@ -1920,7 +1920,7 @@
      Only the sender is traced on entry.
      Use untraceMethod to remove this trace."
 
-    ^ self traceMethodSender:aMethod on:Stderr
+    ^ self traceMethodSender:aMethod on:Processor activeProcess stderr
 !
 
 traceMethodSender:aMethod on:aStream
@@ -2692,7 +2692,7 @@
      Use untrap to remove this trace.
      The current implementation does not allow integers or nil to be traced."
 
-    self trace:anObject selector:aSelector on:Stderr
+    self trace:anObject selector:aSelector on:Processor activeProcess stderr
 
     "
      |p|
@@ -2758,7 +2758,7 @@
      Use untrap:/untrace: to remove this trace.
      The current implementation does not allow integers or nil to be traced."
 
-    self trace:anObject selectors:aCollectionOfSelectors on:Stderr
+    self trace:anObject selectors:aCollectionOfSelectors on:Processor activeProcess stderr
 
     "
      |p|
@@ -2841,7 +2841,7 @@
 traceAll:anObject
     "trace all messages which are understood by anObject"
 
-    self traceAll:anObject on:Stderr
+    self traceAll:anObject on:Processor activeProcess stderr
 
     "
      trace all (implemented) messages sent to Display
@@ -2859,7 +2859,7 @@
 traceAll:anObject from:aClass
     "trace all messages defined in aClass sent to anObject"
 
-    self traceAll:anObject from:aClass on:Stderr
+    self traceAll:anObject from:aClass on:Processor activeProcess stderr
 
     "
      trace all methods in Display, which are implemented
@@ -2924,7 +2924,7 @@
      The current implementation does not allow integers or nil to be traced."
 
     self
-	traceEntry:anObject selectors:aCollectionOfSelectors on:Stderr
+        traceEntry:anObject selectors:aCollectionOfSelectors on:Processor activeProcess stderr
 
     "
      |p|
@@ -2954,7 +2954,7 @@
      Use untrap to remove this trace.
      The current implementation does not allow integers or nil to be traced."
 
-    ^ self traceSender:anObject selector:aSelector on:Stderr
+    ^ self traceSender:anObject selector:aSelector on:Processor activeProcess stderr
 
     "
      |p|
@@ -3445,11 +3445,11 @@
 !
 
 printEntryFull:aContext
-    self printEntryFull:aContext level:0 on:Stderr
+    self printEntryFull:aContext level:0 on:Processor activeProcess stderr
 !
 
 printEntryFull:aContext level:lvl
-    self printEntryFull:aContext level:lvl on:Stderr
+    self printEntryFull:aContext level:lvl on:Processor activeProcess stderr
 !
 
 printEntryFull:aContext level:lvl on:aStream
@@ -3494,11 +3494,11 @@
 !
 
 printExit:aContext with:retVal
-    self printExit:aContext with:retVal level:0 on:Stderr
+    self printExit:aContext with:retVal level:0 on:Processor activeProcess stderr
 !
 
 printExit:aContext with:retVal level:lvl
-    self printExit:aContext with:retVal level:lvl on:Stderr
+    self printExit:aContext with:retVal level:lvl on:Processor activeProcess stderr
 !
 
 printExit:aContext with:retVal level:lvl on:aStream
@@ -3818,56 +3818,56 @@
     StepInterruptPending := nil.
     con := senderContext := thisContext sender.
     ignore := false.
-    outStream := output ? Stderr.
+    outStream := output notNil ifTrue:[output] ifFalse:[Processor activeProcess stderr].
 
     con receiver == Processor ifTrue:[
-	(sel := con selector) == #threadSwitch: ifTrue:[
-	    ignore := true.
-	].
-	sel == #timerInterrupt ifTrue:[
-	    ignore := true.
-	]
+        (sel := con selector) == #threadSwitch: ifTrue:[
+            ignore := true.
+        ].
+        sel == #timerInterrupt ifTrue:[
+            ignore := true.
+        ]
     ].
 
     con lineNumber == 1 ifFalse:[
-	ignore := true
+        ignore := true
     ].
 
     ignore ifFalse:[
-	con markForInterruptOnUnwind.
-
-	((r := con receiver) ~~ self
-	and:[r ~~ tracedBlock]) ifTrue:[
-	    traceDetail == #fullIndent ifTrue:[
-		[con notNil
-		and:[(r := con receiver) ~~ self
-		and:[r ~~ tracedBlock]]] whileTrue:[
-		    '  ' printOn:outStream.
-		    con := con sender.
-		].
-		con := senderContext.
-		self class printFull:con on:outStream withSender:false.
-	    ] ifFalse:[
-		traceDetail == #indent ifTrue:[
-		    [con notNil
-		    and:[(r := con receiver) ~~ self
-		    and:[r ~~ tracedBlock]]] whileTrue:[
-			'  ' printOn:outStream.
-			con := con sender.
-		    ].
-		    con := senderContext.
-		    con printOn:outStream.
-		    outStream cr.
-		] ifFalse:[
-		    traceDetail == true ifTrue:[
-			self class printFull:con on:outStream withSender:true.
-		    ] ifFalse:[
-			con printOn:outStream.
-			outStream cr.
-		    ]
-		]
-	    ].
-	].
+        con markForInterruptOnUnwind.
+
+        ((r := con receiver) ~~ self
+        and:[r ~~ tracedBlock]) ifTrue:[
+            traceDetail == #fullIndent ifTrue:[
+                [con notNil
+                and:[(r := con receiver) ~~ self
+                and:[r ~~ tracedBlock]]] whileTrue:[
+                    '  ' printOn:outStream.
+                    con := con sender.
+                ].
+                con := senderContext.
+                self class printFull:con on:outStream withSender:false.
+            ] ifFalse:[
+                traceDetail == #indent ifTrue:[
+                    [con notNil
+                    and:[(r := con receiver) ~~ self
+                    and:[r ~~ tracedBlock]]] whileTrue:[
+                        '  ' printOn:outStream.
+                        con := con sender.
+                    ].
+                    con := senderContext.
+                    con printOn:outStream.
+                    outStream cr.
+                ] ifFalse:[
+                    traceDetail == true ifTrue:[
+                        self class printFull:con on:outStream withSender:true.
+                    ] ifFalse:[
+                        con printOn:outStream.
+                        outStream cr.
+                    ]
+                ]
+            ].
+        ].
     ].
 
     ObjectMemory flushInlineCaches.