Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.683.mcz
==================== Summary ====================
Name: System-nice.683
Author: nice
Time: 29 July 2014, 12:07:06.101 am
UUID: fd9d9bb4-8ac8-4c13-a4dc-db69df7b35ed
Ancestors: System-nice.682
Let a WriteStream be smart by moving the capability to fileOutClass:andObject: up from ReadWriteStream.
Note: I really don't believe that any of these messages belongs to a Stream hierarchy.
But disentangling the stream mess means loosen more than one knot, and I don't want the operation to look like conjuring, we need a careful trace for understanding, dissecting and reverting the potentially lost features, so one change at a time.
=============== Diff against System-nice.682 ===============
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChangeSet: aChangeSetOrNil andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- "An experimental version to fileout a changeSet first so that a project can contain its own classes"
-
-
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- aChangeSetOrNil ifNotNil: [
- aChangeSetOrNil fileOutPreambleOn: self.
- aChangeSetOrNil fileOutOn: self.
- aChangeSetOrNil fileOutPostscriptOn: self.
- ].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- (SmartRefStream on: self)
- nextPut: theObject; "and all subobjects"
- close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChanges
- "Append to the receiver a description of all class changes."
- Cursor write showWhile:
- [self header; timeStamp.
- ChangeSet current fileOutOn: self.
- self trailer; close]!
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self text.
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
- self binary.
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject blocking: anIdentDict
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream blockers: anIdentDict.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was added:
+ ----- Method: WriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChangeSet: aChangeSetOrNil andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ "An experimental version to fileout a changeSet first so that a project can contain its own classes"
+
+
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ aChangeSetOrNil ifNotNil: [
+ aChangeSetOrNil fileOutPreambleOn: self.
+ aChangeSetOrNil fileOutOn: self.
+ aChangeSetOrNil fileOutPostscriptOn: self.
+ ].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ (SmartRefStream on: self)
+ nextPut: theObject; "and all subobjects"
+ close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChanges
+ "Append to the receiver a description of all class changes."
+ Cursor write showWhile:
+ [self header; timeStamp.
+ ChangeSet current fileOutOn: self.
+ self trailer; close]!
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self text.
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+ self binary.
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject blocking: anIdentDict
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream blockers: anIdentDict.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>padToEndWith: (in category '*System-Object Storage-fileIn/Out') -----
+ padToEndWith: aChar
+ "We don't have pages, so we are at the end, and don't need to pad."!
Item was added:
+ ----- Method: WriteStream>>setFileTypeToObject (in category '*System-Object Storage-fileIn/Out') -----
+ setFileTypeToObject
+
+ "ignore"!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.683.mcz
==================== Summary ====================
Name: System-nice.683
Author: nice
Time: 29 July 2014, 12:07:06.101 am
UUID: fd9d9bb4-8ac8-4c13-a4dc-db69df7b35ed
Ancestors: System-nice.682
Let a WriteStream be smart by moving the capability to fileOutClass:andObject: up from ReadWriteStream.
Note: I really don't believe that any of these messages belongs to a Stream hierarchy.
But disentangling the stream mess means loosen more than one knot, and I don't want the operation to look like conjuring, we need a careful trace for understanding, dissecting and reverting the potentially lost features, so one change at a time.
=============== Diff against System-nice.682 ===============
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChangeSet: aChangeSetOrNil andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- "An experimental version to fileout a changeSet first so that a project can contain its own classes"
-
-
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- aChangeSetOrNil ifNotNil: [
- aChangeSetOrNil fileOutPreambleOn: self.
- aChangeSetOrNil fileOutOn: self.
- aChangeSetOrNil fileOutPostscriptOn: self.
- ].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- (SmartRefStream on: self)
- nextPut: theObject; "and all subobjects"
- close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChanges
- "Append to the receiver a description of all class changes."
- Cursor write showWhile:
- [self header; timeStamp.
- ChangeSet current fileOutOn: self.
- self trailer; close]!
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self text.
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
- self binary.
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject blocking: anIdentDict
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream blockers: anIdentDict.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was added:
+ ----- Method: WriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChangeSet: aChangeSetOrNil andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ "An experimental version to fileout a changeSet first so that a project can contain its own classes"
+
+
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ aChangeSetOrNil ifNotNil: [
+ aChangeSetOrNil fileOutPreambleOn: self.
+ aChangeSetOrNil fileOutOn: self.
+ aChangeSetOrNil fileOutPostscriptOn: self.
+ ].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ (SmartRefStream on: self)
+ nextPut: theObject; "and all subobjects"
+ close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChanges
+ "Append to the receiver a description of all class changes."
+ Cursor write showWhile:
+ [self header; timeStamp.
+ ChangeSet current fileOutOn: self.
+ self trailer; close]!
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self text.
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+ self binary.
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject blocking: anIdentDict
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream blockers: anIdentDict.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>padToEndWith: (in category '*System-Object Storage-fileIn/Out') -----
+ padToEndWith: aChar
+ "We don't have pages, so we are at the end, and don't need to pad."!
Item was added:
+ ----- Method: WriteStream>>setFileTypeToObject (in category '*System-Object Storage-fileIn/Out') -----
+ setFileTypeToObject
+
+ "ignore"!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.683.mcz
==================== Summary ====================
Name: System-nice.683
Author: nice
Time: 29 July 2014, 12:07:06.101 am
UUID: fd9d9bb4-8ac8-4c13-a4dc-db69df7b35ed
Ancestors: System-nice.682
Let a WriteStream be smart by moving the capability to fileOutClass:andObject: up from ReadWriteStream.
Note: I really don't believe that any of these messages belongs to a Stream hierarchy.
But disentangling the stream mess means loosen more than one knot, and I don't want the operation to look like conjuring, we need a careful trace for understanding, dissecting and reverting the potentially lost features, so one change at a time.
=============== Diff against System-nice.682 ===============
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChangeSet: aChangeSetOrNil andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- "An experimental version to fileout a changeSet first so that a project can contain its own classes"
-
-
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- aChangeSetOrNil ifNotNil: [
- aChangeSetOrNil fileOutPreambleOn: self.
- aChangeSetOrNil fileOutOn: self.
- aChangeSetOrNil fileOutPostscriptOn: self.
- ].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- (SmartRefStream on: self)
- nextPut: theObject; "and all subobjects"
- close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
- fileOutChanges
- "Append to the receiver a description of all class changes."
- Cursor write showWhile:
- [self header; timeStamp.
- ChangeSet current fileOutOn: self.
- self trailer; close]!
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self text.
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
- self binary.
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was removed:
- ----- Method: ReadWriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
- fileOutClass: extraClass andObject: theObject blocking: anIdentDict
- "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
-
- | class srefStream |
- self setFileTypeToObject.
- "Type and Creator not to be text, so can attach correctly to an email msg"
- self header; timeStamp.
-
- extraClass ifNotNil: [
- class := extraClass. "A specific class the user wants written"
- class sharedPools size > 0 ifTrue:
- [class shouldFileOutPools
- ifTrue: [class fileOutSharedPoolsOn: self]].
- class fileOutOn: self moveSource: false toFile: 0].
- self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
-
- "Append the object's raw data"
- srefStream := SmartRefStream on: self.
- srefStream blockers: anIdentDict.
- srefStream nextPut: theObject. "and all subobjects"
- srefStream close. "also closes me"
- !
Item was added:
+ ----- Method: WriteStream>>fileOutChangeSet:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChangeSet: aChangeSetOrNil andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ "An experimental version to fileout a changeSet first so that a project can contain its own classes"
+
+
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ aChangeSetOrNil ifNotNil: [
+ aChangeSetOrNil fileOutPreambleOn: self.
+ aChangeSetOrNil fileOutOn: self.
+ aChangeSetOrNil fileOutPostscriptOn: self.
+ ].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ (SmartRefStream on: self)
+ nextPut: theObject; "and all subobjects"
+ close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutChanges (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutChanges
+ "Append to the receiver a description of all class changes."
+ Cursor write showWhile:
+ [self header; timeStamp.
+ ChangeSet current fileOutOn: self.
+ self trailer; close]!
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically."
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self text.
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+ self binary.
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>fileOutClass:andObject:blocking: (in category '*System-Object Storage-fileIn/Out') -----
+ fileOutClass: extraClass andObject: theObject blocking: anIdentDict
+ "Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream"
+
+ | class srefStream |
+ self setFileTypeToObject.
+ "Type and Creator not to be text, so can attach correctly to an email msg"
+ self header; timeStamp.
+
+ extraClass ifNotNil: [
+ class := extraClass. "A specific class the user wants written"
+ class sharedPools size > 0 ifTrue:
+ [class shouldFileOutPools
+ ifTrue: [class fileOutSharedPoolsOn: self]].
+ class fileOutOn: self moveSource: false toFile: 0].
+ self trailer. "Does nothing for normal files. HTML streams will have trouble with object data"
+
+ "Append the object's raw data"
+ srefStream := SmartRefStream on: self.
+ srefStream blockers: anIdentDict.
+ srefStream nextPut: theObject. "and all subobjects"
+ srefStream close. "also closes me"
+ !
Item was added:
+ ----- Method: WriteStream>>padToEndWith: (in category '*System-Object Storage-fileIn/Out') -----
+ padToEndWith: aChar
+ "We don't have pages, so we are at the end, and don't need to pad."!
Item was added:
+ ----- Method: WriteStream>>setFileTypeToObject (in category '*System-Object Storage-fileIn/Out') -----
+ setFileTypeToObject
+
+ "ignore"!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.682.mcz
==================== Summary ====================
Name: System-nice.682
Author: nice
Time: 28 July 2014, 11:38:58.476 pm
UUID: f38c414b-25fc-4c7c-ab24-c2d05b1699cf
Ancestors: System-nice.681
Use peekLast in ReferenceStream rather than skip: -1; next.
This is now going to work on a simple WriteStream (no ReadWriteStream requirement).
Note: I don't understand what was a uggly workaround, the fact to peekLast, or (byteStream skip: 0)?
If it's (byteStream skip: 0), I don't know what it works around, and I just cross fingers...
The sole reference google got me was too far and too light http://st-www.cs.illinois.edu/squeak/Squeak2.0/updates/152hide&show-LG-tk.cs
=============== Diff against System-nice.681 ===============
Item was changed:
----- Method: ReferenceStream>>beginInstance:size: (in category 'writing') -----
beginInstance: aClass size: anInteger
"This is for use by storeDataOn: methods. Cf. Object>>storeDataOn:."
"Addition of 1 seems to make extra work, since readInstance has to compensate. Here for historical reasons dating back to Kent Beck's original implementation in late 1988.
In ReferenceStream, class is just 5 bytes for shared symbol.
SmartRefStream puts out the names and number of class's instances variables for checking.
6/10/97 16:09 tk: See if we can put on a short header. Type = 16. "
| short ref |
short := true. "All tests for object header that can be written in 4 bytes"
anInteger <= 254 ifFalse: [short := false]. "one byte size"
ref := references at: aClass name ifAbsent: [short := false. nil].
ref isInteger ifFalse: [short := false].
short ifTrue: [short := (ref < 65536) & (ref > 0) "& (ref ~= self vacantRef)"]. "vacantRef is big"
+ short ifTrue: [short := byteStream peekLast = 9]. "ugly workaround"
- short ifTrue: [
- byteStream skip: -1.
- short := byteStream next = 9.
- byteStream skip: 0]. "ugly workaround"
short
ifTrue: ["passed all the tests!!"
byteStream skip: -1; nextPut: 16; "type = short header"
nextPut: anInteger + 1; "size is short"
nextNumber: 2 put: ref]
ifFalse: [
"default to normal longer object header"
byteStream nextNumber: 4 put: anInteger + 1.
self nextPut: aClass name].
insideASegment ifTrue: [
aClass isSystemDefined ifFalse: [self nextPut: aClass]].
"just record it to put it into roots"!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.682.mcz
==================== Summary ====================
Name: System-nice.682
Author: nice
Time: 28 July 2014, 11:38:58.476 pm
UUID: f38c414b-25fc-4c7c-ab24-c2d05b1699cf
Ancestors: System-nice.681
Use peekLast in ReferenceStream rather than skip: -1; next.
This is now going to work on a simple WriteStream (no ReadWriteStream requirement).
Note: I don't understand what was a uggly workaround, the fact to peekLast, or (byteStream skip: 0)?
If it's (byteStream skip: 0), I don't know what it works around, and I just cross fingers...
The sole reference google got me was too far and too light http://st-www.cs.illinois.edu/squeak/Squeak2.0/updates/152hide&show-LG-tk.cs
=============== Diff against System-nice.681 ===============
Item was changed:
----- Method: ReferenceStream>>beginInstance:size: (in category 'writing') -----
beginInstance: aClass size: anInteger
"This is for use by storeDataOn: methods. Cf. Object>>storeDataOn:."
"Addition of 1 seems to make extra work, since readInstance has to compensate. Here for historical reasons dating back to Kent Beck's original implementation in late 1988.
In ReferenceStream, class is just 5 bytes for shared symbol.
SmartRefStream puts out the names and number of class's instances variables for checking.
6/10/97 16:09 tk: See if we can put on a short header. Type = 16. "
| short ref |
short := true. "All tests for object header that can be written in 4 bytes"
anInteger <= 254 ifFalse: [short := false]. "one byte size"
ref := references at: aClass name ifAbsent: [short := false. nil].
ref isInteger ifFalse: [short := false].
short ifTrue: [short := (ref < 65536) & (ref > 0) "& (ref ~= self vacantRef)"]. "vacantRef is big"
+ short ifTrue: [short := byteStream peekLast = 9]. "ugly workaround"
- short ifTrue: [
- byteStream skip: -1.
- short := byteStream next = 9.
- byteStream skip: 0]. "ugly workaround"
short
ifTrue: ["passed all the tests!!"
byteStream skip: -1; nextPut: 16; "type = short header"
nextPut: anInteger + 1; "size is short"
nextNumber: 2 put: ref]
ifFalse: [
"default to normal longer object header"
byteStream nextNumber: 4 put: anInteger + 1.
self nextPut: aClass name].
insideASegment ifTrue: [
aClass isSystemDefined ifFalse: [self nextPut: aClass]].
"just record it to put it into roots"!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.682.mcz
==================== Summary ====================
Name: System-nice.682
Author: nice
Time: 28 July 2014, 11:38:58.476 pm
UUID: f38c414b-25fc-4c7c-ab24-c2d05b1699cf
Ancestors: System-nice.681
Use peekLast in ReferenceStream rather than skip: -1; next.
This is now going to work on a simple WriteStream (no ReadWriteStream requirement).
Note: I don't understand what was a uggly workaround, the fact to peekLast, or (byteStream skip: 0)?
If it's (byteStream skip: 0), I don't know what it works around, and I just cross fingers...
The sole reference google got me was too far and too light http://st-www.cs.illinois.edu/squeak/Squeak2.0/updates/152hide&show-LG-tk.cs
=============== Diff against System-nice.681 ===============
Item was changed:
----- Method: ReferenceStream>>beginInstance:size: (in category 'writing') -----
beginInstance: aClass size: anInteger
"This is for use by storeDataOn: methods. Cf. Object>>storeDataOn:."
"Addition of 1 seems to make extra work, since readInstance has to compensate. Here for historical reasons dating back to Kent Beck's original implementation in late 1988.
In ReferenceStream, class is just 5 bytes for shared symbol.
SmartRefStream puts out the names and number of class's instances variables for checking.
6/10/97 16:09 tk: See if we can put on a short header. Type = 16. "
| short ref |
short := true. "All tests for object header that can be written in 4 bytes"
anInteger <= 254 ifFalse: [short := false]. "one byte size"
ref := references at: aClass name ifAbsent: [short := false. nil].
ref isInteger ifFalse: [short := false].
short ifTrue: [short := (ref < 65536) & (ref > 0) "& (ref ~= self vacantRef)"]. "vacantRef is big"
+ short ifTrue: [short := byteStream peekLast = 9]. "ugly workaround"
- short ifTrue: [
- byteStream skip: -1.
- short := byteStream next = 9.
- byteStream skip: 0]. "ugly workaround"
short
ifTrue: ["passed all the tests!!"
byteStream skip: -1; nextPut: 16; "type = short header"
nextPut: anInteger + 1; "size is short"
nextNumber: 2 put: ref]
ifFalse: [
"default to normal longer object header"
byteStream nextNumber: 4 put: anInteger + 1.
self nextPut: aClass name].
insideASegment ifTrue: [
aClass isSystemDefined ifFalse: [self nextPut: aClass]].
"just record it to put it into roots"!
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.580.mcz
==================== Summary ====================
Name: Collections-nice.580
Author: nice
Time: 28 July 2014, 10:42:04.046 pm
UUID: 5f8aabc7-d706-48e6-8d68-e591c6d00176
Ancestors: Collections-nice.579
peekLast commit and try again...
=============== Diff against Collections-nice.579 ===============
Item was changed:
----- Method: RWBinaryOrTextStream>>peekLast (in category 'accessing') -----
peekLast
"Return that item just put at the end of the stream"
^ position > 0
ifTrue: [self isBinary
+ ifTrue: [(collection at: position) asInteger]
+ ifFalse: [(collection at: position) asCharacter]]
- ifTrue: [(collection at: position) asCharacter]
- ifFalse: [(collection at: position) asInteger]]
ifFalse: [nil]!