Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.335.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.335 Author: eem Time: 23 August 2013, 11:52:49.022 am UUID: 02e5ae48-52a4-4324-9b6d-887f45be6a12 Ancestors: VMMaker.oscog-eem.334
Fix snafu in unpairedMethodList maintennance during code compaction. Must only examine CMMethods.
=============== Diff against VMMaker.oscog-eem.334 ===============
Item was changed: ----- Method: CogMethodZone>>compactCompiledCode: (in category 'compaction') ----- compactCompiledCode: objectHeaderValue | source dest bytes | <var: #source type: #'CogMethod *'> <var: #dest type: #'CogMethod *'> source := coInterpreter cCoerceSimple: baseAddress to: #'CogMethod *'. openPICList := nil. methodCount := 0. self cppIf: NewspeakVM ifTrue: [unpairedMethodList := nil]. [source < self limitZony and: [source cmType ~= CMFree]] whileTrue: [self assert: (cogit cogMethodDoesntLookKosher: source) = 0. source objectHeader: objectHeaderValue. source cmUsageCount > 0 ifTrue: [source cmUsageCount: source cmUsageCount // 2]. self cppIf: NewspeakVM ifTrue: + [(source cmType = CMMethod + and: [(coInterpreter rawHeaderOf: source methodObject) asInteger ~= source asInteger]) ifTrue: - [(coInterpreter rawHeaderOf: source methodObject) asInteger ~= source asInteger ifTrue: [source nextMethod: unpairedMethodList. unpairedMethodList := source]]. source cmType = CMOpenPIC ifTrue: [source nextOpenPIC: openPICList asUnsignedInteger. openPICList := source]. methodCount := methodCount + 1. source := self methodAfter: source]. source >= self limitZony ifTrue: [^self halt: 'no free methods; cannot compact.']. dest := source. [source < self limitZony] whileTrue: [self assert: (cogit maybeFreeCogMethodDoesntLookKosher: source) = 0. bytes := source blockSize. source cmType ~= CMFree ifTrue: [methodCount := methodCount + 1. self mem: dest mo: source ve: bytes. dest objectHeader: objectHeaderValue. dest cmType = CMMethod ifTrue: ["For non-Newspeak there should be a one-to-one mapping between bytecoded and cog methods. For Newspeak not necessarily, but only for anonymous accessors." "Only update the original method's header if it is referring to this CogMethod." (coInterpreter rawHeaderOf: dest methodObject) asInteger = source asInteger ifTrue: [coInterpreter rawHeaderOf: dest methodObject put: dest asInteger] ifFalse: [self assert: (cogit noAssertMethodClassAssociationOf: dest methodObject) = objectMemory nilObject. self cppIf: NewspeakVM ifTrue: [dest nextMethod: unpairedMethodList. unpairedMethodList := dest]]] ifFalse: [dest cmType = CMOpenPIC ifTrue: [dest nextOpenPIC: openPICList asUnsignedInteger. openPICList := dest]]. dest cmUsageCount > 0 ifTrue: [dest cmUsageCount: dest cmUsageCount // 2]. dest := coInterpreter cCoerceSimple: dest asUnsignedInteger + bytes to: #'CogMethod *']. source := coInterpreter cCoerceSimple: source asUnsignedInteger + bytes to: #'CogMethod *']. mzFreeStart := dest asUnsignedInteger. methodBytesFreedSinceLastCompaction := 0!
vm-dev@lists.squeakfoundation.org