The Trunk: System-nice.683.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-nice.683.mcz

commits-2
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"!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-nice.683.mcz

Frank Shearar-3
On 28 July 2014 23:07,  <[hidden email]> wrote:

> 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.

+1

frank