[Vm-dev] VM Maker: Cog-eem.237.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 29 19:34:38 UTC 2015


Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.237.mcz

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

Name: Cog-eem.237
Author: eem
Time: 29 January 2015, 11:34:27.587 am
UUID: 1de3da6c-04d7-4755-b2c4-be65e666f6a7
Ancestors: Cog-eem.236

Spur bootstrap:
When patching System, remove ObjectHistory.

Simplify patchForPackage:withPatches:snapshot: to
patches:forSnapshot: by looking in the snapshot for
classes, not the host system.

=============== Diff against Cog-eem.236 ===============

Item was removed:
- ----- Method: SpurBootstrapMonticelloPackagePatcher>>patchForPackage:withPatches:snapshot: (in category 'patching') -----
- patchForPackage: package withPatches: patches snapshot: snapshot
- 	(package includesClass: Character) ifTrue:
- 		[patches
- 			addAll: (self filteredDefinitionsAsPatches: (self modifiedCharacterDefinitionsIn: snapshot definitions)
- 						patches: patches);
- 			add: (self
- 					classDefinitionFor: #Character
- 					type: #immediate
- 					from: snapshot definitions
- 					comment: 'I represent a character by storing its associated Unicode as an unsigned 30-bit value.  Characters are created uniquely, so that all instances of a particular Unicode are identical.  My instances are encoded in tagged pointers in the VM, so called immediates, and therefore are pure immutable values.
- 
- 	The code point is based on Unicode.  Since Unicode is 21-bit wide character set, we have several bits available for other information.  As the Unicode Standard  states, a Unicode code point doesn''t carry the language information.  This is going to be a problem with the languages so called CJK (Chinese, Japanese, Korean.  Or often CJKV including Vietnamese).  Since the characters of those languages are unified and given the same code point, it is impossible to display a bare Unicode code point in an inspector or such tools.  To utilize the extra available bits, we use them for identifying the languages.  Since the old implementation uses the bits to identify the character encoding, the bits are sometimes called "encoding tag" or neutrally "leading char", but the bits rigidly denotes the concept of languages.
- 
- 	The other languages can have the language tag if you like.  This will help to break the large default font (font set) into separately loadable chunk of fonts.  However, it is open to the each native speakers and writers to decide how to define the character equality, since the same Unicode code point may have different language tag thus simple #= comparison may return false.'
- 					stamp: 'eem 8/12/2014 14:53')].
- 	(package includesClass: SmallInteger) ifTrue:
- 		[patches
- 			add: (self
- 					classDefinitionFor: #SmallInteger
- 					type: #immediate
- 					from: snapshot definitions
- 					comment: 'My instances are at least 31-bit numbers, stored in twos complement form. The allowable range in 32-bits is approximately +- 10^9 (+- 1billion).  In 64-bits my instances are 61-bit numbers, stored in twos complement form. The allowable range is approximately +- 10^18 (+- 1 quintillion).   The actual values are computed at start-up.  See SmallInteger class startUp:, minVal, maxVal.'
- 					stamp: 'eem 11/20/2014 08:41')].
- 	(package includesClass: Float) ifTrue:
- 		[patches
- 			add: (self
- 					classDefinitionFor: #Float
- 					type: #normal
- 					from: snapshot definitions
- 					comment: nil
- 					stamp: nil);
- 			add: (self
- 					classDefinitionFor: #BoxedFloat64
- 					type: #words
- 					from: snapshot definitions
- 					comment: 'My instances hold 64-bit Floats in heap objects.  This is the only representation on 32-bit systems.  But on 64-bit systems SmallFloat64 holds a subset of the full 64-bit double-precision range in immediate objects.'
- 					stamp: 'eem 11/25/2014 07:54');
- 			add: (self
- 					classDefinitionFor: #SmallFloat64
- 					type: #immediate
- 					from: snapshot definitions
- 					comment: 'My instances represent 64-bit Floats whose exponent fits in 8 bits as immediate objects.  This representation is only available on 64-bit systems, not 32-bit systems.'
- 					stamp: 'eem 11/25/2014 07:54');
- 			addAll: (self filteredDefinitionsAsPatches: (self modifiedFloatDefinitionsIn: snapshot definitions)
- 						patches: patches)].
- 	(package includesClass: CompiledMethod) ifTrue:
- 		[patches
- 			add: self compiledMethodClassDefinition].
- 	^MCPatch operations: patches!

Item was added:
+ ----- Method: SpurBootstrapMonticelloPackagePatcher>>patches:forSnapshot: (in category 'patching') -----
+ patches: patches forSnapshot: snapshot
+ 	"Add modified class defs for Character, SmallInteger, Float, BoxedFloat64, SmallFloat64 and COmpiledMethod.
+ 	 Remove ObjectHistory and ObjectHistoryMark (which Spur does not support)."
+ 	| defs |
+ 	defs := snapshot definitions.
+ 	(defs anySatisfy: [:d| d isClassDefinition and: [d className == #Character]]) ifTrue:
+ 		[patches
+ 			addAll: (self filteredDefinitionsAsPatches: (self modifiedCharacterDefinitionsIn: snapshot definitions)
+ 						patches: patches);
+ 			add: (self
+ 					classDefinitionFor: #Character
+ 					type: #immediate
+ 					from: snapshot definitions
+ 					comment: 'I represent a character by storing its associated Unicode as an unsigned 30-bit value.  Characters are created uniquely, so that all instances of a particular Unicode are identical.  My instances are encoded in tagged pointers in the VM, so called immediates, and therefore are pure immutable values.
+ 
+ 	The code point is based on Unicode.  Since Unicode is 21-bit wide character set, we have several bits available for other information.  As the Unicode Standard  states, a Unicode code point doesn''t carry the language information.  This is going to be a problem with the languages so called CJK (Chinese, Japanese, Korean.  Or often CJKV including Vietnamese).  Since the characters of those languages are unified and given the same code point, it is impossible to display a bare Unicode code point in an inspector or such tools.  To utilize the extra available bits, we use them for identifying the languages.  Since the old implementation uses the bits to identify the character encoding, the bits are sometimes called "encoding tag" or neutrally "leading char", but the bits rigidly denotes the concept of languages.
+ 
+ 	The other languages can have the language tag if you like.  This will help to break the large default font (font set) into separately loadable chunk of fonts.  However, it is open to the each native speakers and writers to decide how to define the character equality, since the same Unicode code point may have different language tag thus simple #= comparison may return false.'
+ 					stamp: 'eem 8/12/2014 14:53')].
+ 	(defs anySatisfy: [:def| def isClassDefinition and: [def className == #SmallInteger]]) ifTrue:
+ 		[patches
+ 			add: (self
+ 					classDefinitionFor: #SmallInteger
+ 					type: #immediate
+ 					from: snapshot definitions
+ 					comment: 'My instances are at least 31-bit numbers, stored in twos complement form. The allowable range in 32-bits is approximately +- 10^9 (+- 1billion).  In 64-bits my instances are 61-bit numbers, stored in twos complement form. The allowable range is approximately +- 10^18 (+- 1 quintillion).   The actual values are computed at start-up.  See SmallInteger class startUp:, minVal, maxVal.'
+ 					stamp: 'eem 11/20/2014 08:41')].
+ 	(defs anySatisfy: [:def| def isClassDefinition and: [def className == #Float]]) ifTrue:
+ 		[patches
+ 			add: (self
+ 					classDefinitionFor: #Float
+ 					type: #normal
+ 					from: snapshot definitions
+ 					comment: nil
+ 					stamp: nil);
+ 			add: (self
+ 					classDefinitionFor: #BoxedFloat64
+ 					type: #words
+ 					from: snapshot definitions
+ 					comment: 'My instances hold 64-bit Floats in heap objects.  This is the only representation on 32-bit systems.  But on 64-bit systems SmallFloat64 holds a subset of the full 64-bit double-precision range in immediate objects.'
+ 					stamp: 'eem 11/25/2014 07:54');
+ 			add: (self
+ 					classDefinitionFor: #SmallFloat64
+ 					type: #immediate
+ 					from: snapshot definitions
+ 					comment: 'My instances represent 64-bit Floats whose exponent fits in 8 bits as immediate objects.  This representation is only available on 64-bit systems, not 32-bit systems.'
+ 					stamp: 'eem 11/25/2014 07:54');
+ 			addAll: (self filteredDefinitionsAsPatches: (self modifiedFloatDefinitionsIn: snapshot definitions)
+ 						patches: patches)].
+ 	(defs anySatisfy: [:def| def isClassDefinition and: [def className == #CompiledMethod]]) ifTrue:
+ 		[patches
+ 			add: self compiledMethodClassDefinition].
+ 	(defs anySatisfy: [:def| def isClassDefinition and: [def className == #ObjectHistory]]) ifTrue:
+ 		[patches addAll:
+ 			(defs
+ 				select: [:def| #(ObjectHistory ObjectHistoryMark) includes: def className]
+ 				thenCollect: [:def| MCRemoval of: def])].
+ 	^MCPatch operations: patches!

Item was changed:
  ----- Method: SpurBootstrapMonticelloPackagePatcher>>version:withPatches:for: (in category 'patching') -----
  version: version withPatches: patches for: package
  	| snapshot ancestry possibleSpurAncestor actualAncestor |
  	snapshot := MCPatcher
+ 					apply: (self patches: patches forSnapshot: version snapshot)
- 					apply: (self patchForPackage: package withPatches: patches snapshot: version snapshot)
  					to: version snapshot.
  	ancestry := MCWorkingAncestry new addAncestor: version info.
  	"this is a hack; we may not be patching w.r.t. a directory or trunk"
  	possibleSpurAncestor := (self spurBranchNameForInfo: version info ancestors first package: package) , '.mcz'.
  	(destDir includesKey: possibleSpurAncestor)
  		ifTrue:
  			[actualAncestor := self versionFor: possibleSpurAncestor in: destDir]
  		ifFalse:
  			[((self trunk versionNamesForPackageNamed: package name) includes: possibleSpurAncestor) ifTrue:
  				[actualAncestor := self trunk versionNamed: possibleSpurAncestor]].
  	actualAncestor ifNotNil:
  		[ancestry addAncestor: actualAncestor info].
  	^MCVersion
  		package: version package
  		info: (ancestry
  				infoWithName: (self spurBranchNameForInfo: version info package: package)
  				message:	version info name,
  							' patched for Spur by ',
  							(CCodeGenerator shortMonticelloDescriptionForClass: self class),
  							'\\' withCRs,
  							version info message)
  		snapshot: snapshot
  		dependencies: {} "punt on computing dependencies; there are't any so far"!

Item was added:
+ ----- Method: SpurBootstrapPrototypes>>ObjectPROTOTYPEoopAge (in category 'method prototypes') -----
+ ObjectPROTOTYPEoopAge
+ 	<remove>!

Item was added:
+ ----- Method: SpurBootstrapPrototypes>>ObjectPROTOTYPEoopTimestamp (in category 'method prototypes') -----
+ ObjectPROTOTYPEoopTimestamp
+ 	<remove>!



More information about the Vm-dev mailing list