ChangeSet.st
branchjv
changeset 3049 b920db5cdeb3
parent 3043 a13599b9f7e6
child 3050 dd9d607b0c20
--- a/ChangeSet.st	Thu Apr 12 18:19:04 2012 +0100
+++ b/ChangeSet.st	Fri Apr 13 13:37:41 2012 +0100
@@ -43,7 +43,8 @@
 !
 
 Object subclass:#ClassInfo
-	instanceVariableNames:'name superclass definition methods methodDictionary namespace'
+	instanceVariableNames:'name superclass definition methods methodDictionary namespace
+		primitiveDefinitions primitiveVariables primitiveFunctions'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:ChangeSet::ClassSourceWriter
@@ -3180,9 +3181,32 @@
     "Created: / 20-03-2012 / 22:33:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-fileOutPrimitiveSpecsOf: nonMeta on:outStream
-
-    "Nothing now..."
+fileOutPrimitiveSpecsOf: nonMeta on:aStream
+    "append primitive defs (if any) to aStream."
+
+    |s|
+
+    "
+     primitive definitions - if any
+    "
+    (s := nonMeta primitiveDefinitionsString) notNil ifTrue:[
+        aStream nextPutChunkSeparator.
+        nonMeta printClassNameOn:aStream.
+        aStream nextPutAll:' primitiveDefinitions';
+                nextPutChunkSeparator;
+                cr.
+        aStream nextPutAll:s.
+        aStream nextPutChunkSeparator; space; nextPutChunkSeparator; cr; cr
+    ].
+    (s := nonMeta primitiveVariablesString) notNil ifTrue:[
+        aStream nextPutChunkSeparator.
+        nonMeta printClassNameOn:aStream.
+        aStream nextPutAll:' primitiveVariables';
+                nextPutChunkSeparator;
+                cr.
+        aStream nextPutAll:s.
+        aStream nextPutChunkSeparator; space; nextPutChunkSeparator; cr; cr
+    ].
 
     "Created: / 15-03-2012 / 19:48:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -3285,6 +3309,42 @@
     namespace := aString.
 !
 
+primitiveDefinitions
+    ^ primitiveDefinitions
+!
+
+primitiveDefinitionsString
+    ^ primitiveDefinitions isNil 
+        ifTrue:[nil]
+        ifFalse:[primitiveDefinitions source]
+
+    "Created: / 13-04-2012 / 13:14:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+primitiveFunctions
+    ^ primitiveFunctions
+!
+
+primitiveFunctionsString
+    ^ primitiveFunctions isNil 
+        ifTrue:[nil]
+        ifFalse:[primitiveFunctions source]
+
+    "Created: / 13-04-2012 / 13:15:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+primitiveVariables
+    ^ primitiveVariables
+!
+
+primitiveVariablesString
+    ^ primitiveVariables isNil 
+        ifTrue:[nil]
+        ifFalse:[primitiveVariables source]
+
+    "Created: / 13-04-2012 / 13:15:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 selectorAtMethod: m
     ^m selector
 
@@ -3323,6 +3383,21 @@
         ^self
     ].
 
+    change isPrimitiveDefinitionsChange ifTrue:[
+        primitiveDefinitions := change.
+        ^self
+    ].
+
+    change isPrimitiveVariablesChange ifTrue:[
+        primitiveVariables := change.
+        ^self
+    ].
+
+    change isPrimitiveFunctionsChange ifTrue:[
+        primitiveFunctions := change.
+        ^self
+    ].
+
     self error: 'Unknown change'
 
     "Created: / 15-03-2012 / 19:12:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -3811,5 +3886,5 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st 1910 2012-04-03 12:29:20Z vranyj1 $'
+    ^ '$Id: ChangeSet.st 1918 2012-04-13 12:37:41Z vranyj1 $'
 ! !