[squeak-dev] The Trunk: System-topa.742.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 25 08:25:52 UTC 2015


Tobias Pape uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-topa.742.mcz

==================== Summary ====================

Name: System-topa.742
Author: topa
Time: 25 June 2015, 10:25:17.963 am
UUID: fb848387-2569-4297-bcbe-3b292a38b654
Ancestors: System-topa.741

Shortcut float types for DataStream.

This is messy but the alternatives aren't better.

=============== Diff against System-topa.741 ===============

Item was changed:
  ----- Method: DataStream>>typeIDFor: (in category 'write and read') -----
  typeIDFor: anObject
  	"Return the typeID for anObject's class.  This is where the tangle of objects is clipped to stop everything from going out.  
  	Classes can control their instance variables by defining objectToStoreOnDataStream.
  	Any object in blockers is not written out.  See ReferenceStream.objectIfBlocked: and DataStream nextPut:.
  	Morphs do not write their owners.  See Morph.storeDataOn:   Each morph tells itself to 'prepareToBeSaved' before writing out."
+ 
+ 
+ 	anObject isFloat ifTrue: [^14]. "shortcut floats of any representation."
- 	
  	^ TypeMap at: anObject class ifAbsent: [9 "instance of any normal class"]	
  "See DataStream initialize.  nil=1. true=2. false=3. a SmallInteger=4. (a String was 5). a Symbol=6.  a ByteArray=7. an Array=8. other = 9.  a Bitmap=11. a Metaclass=12. a Float=14.  a Rectangle=15. any instance that can have a short header=16.  a String=17 (new format). a WordArray=18."!



More information about the Squeak-dev mailing list