[Pkg] The Trunk: Monticello-dtl.672.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 6 16:25:57 UTC 2017


David T. Lewis uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-dtl.672.mcz

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

Name: Monticello-dtl.672
Author: dtl
Time: 6 August 2017, 12:25:45.326051 pm
UUID: dfe33bfa-dc27-4c01-a1db-234bd7e4433c
Ancestors: Monticello-eem.671

CompiledCode and its subclasses are a special case, and are identified as class type #compiledMethod rather than #bytes. An MCClassDefinition should identify this type correctly, otherwise changes to these classes may not be saved and reloaded correctly.

See MCClassDefinitionTest.

=============== Diff against Monticello-eem.671 ===============

Item was changed:
  ----- Method: MCClassDefinition>>initializeWithName:superclassName:category:instVarNames:classVarNames:poolDictionaryNames:classInstVarNames:type:comment:commentStamp: (in category 'initializing') -----
  initializeWithName: nameString
  superclassName: superclassString
  category: categoryString 
  instVarNames: ivarArray
  classVarNames: cvarArray
  poolDictionaryNames: poolArray
  classInstVarNames: civarArray
  type: typeSymbol
  comment: commentString
  commentStamp: stampStringOrNil
  	name := nameString asSymbol.
  	superclassName := superclassString ifNil: ['nil'] ifNotNil: [superclassString asSymbol].
  	category := categoryString.
+ 	(self isCompiledCode: name) ifTrue: [type := #compiledMethod] ifFalse: [type := typeSymbol].
- 	name = #CompiledMethod ifTrue: [type := #compiledMethod] ifFalse: [type := typeSymbol].
  	comment := commentString withSqueakLineEndings.
  	commentStamp := stampStringOrNil ifNil: [self defaultCommentStamp].
  	variables := OrderedCollection  new.
  	self addVariables: ivarArray ofType: MCInstanceVariableDefinition.
  	self addVariables: cvarArray sorted ofType: MCClassVariableDefinition.
  	self addVariables: poolArray sorted ofType: MCPoolImportDefinition.
  	self addVariables: civarArray ofType: MCClassInstanceVariableDefinition.!

Item was changed:
  ----- Method: MCClassDefinition>>initializeWithName:superclassName:traitComposition:classTraitComposition:category:instVarNames:classVarNames:poolDictionaryNames:classInstVarNames:type:comment:commentStamp: (in category 'initializing') -----
  initializeWithName: nameString
  superclassName: superclassString
  traitComposition: traitCompositionString
  classTraitComposition: classTraitCompositionString
  category: categoryString 
  instVarNames: ivarArray
  classVarNames: cvarArray
  poolDictionaryNames: poolArray
  classInstVarNames: civarArray
  type: typeSymbol
  comment: commentString
  commentStamp: stampStringOrNil
  	name := nameString asSymbol.
  	superclassName := superclassString ifNil: ['nil'] ifNotNil: [superclassString asSymbol].
  	traitComposition := traitCompositionString.
  	classTraitComposition := classTraitCompositionString.
  	category := categoryString.
+ 	(self isCompiledCode: name) ifTrue: [type := #compiledMethod] ifFalse: [type := typeSymbol].
- 	name = #CompiledMethod ifTrue: [type := #compiledMethod] ifFalse: [type := typeSymbol].
  	comment := commentString withSqueakLineEndings.
  	commentStamp := stampStringOrNil ifNil: [self defaultCommentStamp].
  	variables := OrderedCollection  new.
  	self addVariables: ivarArray ofType: MCInstanceVariableDefinition.
  	self addVariables: cvarArray sorted ofType: MCClassVariableDefinition.
  	self addVariables: poolArray sorted ofType: MCPoolImportDefinition.
  	self addVariables: civarArray ofType: MCClassInstanceVariableDefinition.!

Item was added:
+ ----- Method: MCClassDefinition>>isCompiledCode: (in category 'initializing') -----
+ isCompiledCode: className
+ 	"Classes of type #compiledMethod are treated specially. CompiledCode
+ 	and all of its subclasses, including CompiledMethod, should have this
+ 	special type."
+ 
+ 	CompiledCode
+ 		withAllSubclassesDo: [ :cls | (className = cls name)
+ 			ifTrue: [ ^true ]].
+ 	^ false
+ !



More information about the Packages mailing list