[Vm-dev] VM Maker: Cog-eem.110.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Oct 10 19:26:19 UTC 2013
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.110.mcz
==================== Summary ====================
Name: Cog-eem.110
Author: eem
Time: 10 October 2013, 12:25:53.97 pm
UUID: 22061f26-fa82-4afd-8e92-6d639151a8e0
Ancestors: Cog-eem.109
Remember to write out the last segment, bozo!
=============== Diff against Cog-eem.109 ===============
Item was changed:
----- Method: SpurBootstrap>>writeSnapshotOfTransformedImage (in category 'testing') -----
writeSnapshotOfTransformedImage
"The bootstrapped image typically contains a few big free chunks and one huge free chunk.
Test snapshot writing and loading by turning the largest non-huge chunks into segment bridges
and saving."
+ | last heap sizes counts barriers sim |
- | heap sizes counts barriers sim |
heap := TransformedImage veryDeepCopy.
sim := StackInterpreterSimulator onObjectMemory: heap.
heap coInterpreter: sim.
sim initializeInterpreter: 0;
setImageHeaderFlagsFrom: ImageHeaderFlags.
+ heap allOldSpaceEntitiesDo: [:e| last := e].
+ self assert: (heap isFreeObject: last).
sizes := Bag new.
heap allObjectsInFreeTree: (heap freeLists at: 0) do:
[:f|
sizes add: (heap bytesInObject: f)].
counts := sizes sortedCounts.
self assert: counts last key = 1. "1 huge chunk"
self assert: ((counts at: counts size - 1) key > 2
and: [(counts at: counts size - 1) value > 1024]).
barriers := (1 to: (counts at: counts size - 1) key) collect:
[:ign| heap allocateOldSpaceChunkOfExactlyBytes: (counts at: counts size - 1) value].
+ heap segmentManager initializeFromFreeChunks:
+ (barriers sort collect: [:b| heap objectStartingAt: b]),
+ { last }.
- heap segmentManager initializeFromFreeChunks: (barriers sort collect: [:b| heap objectStartingAt: b]).
sim imageName: 'spur.image'.
sim writeImageFileIO!
More information about the Vm-dev
mailing list