[Vm-dev] VM Maker: Cog-eem.210.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 15 18:43:13 UTC 2014
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.210.mcz
==================== Summary ====================
Name: Cog-eem.210
Author: eem
Time: 15 October 2014, 11:42:52.194 am
UUID: 8ffc4e21-a5b2-4526-abec-324772d765d7
Ancestors: Cog-eem.209
Fix bootstrap given addition of remapBuffer assert
check in slowPrmitiveResponse in VMMaker.oscog-eem.897.
=============== Diff against Cog-eem.209 ===============
Item was changed:
----- Method: SimulatorHarness>>withExecutableInterpreter:do: (in category 'bootstrap methods') -----
withExecutableInterpreter: sim do: aBlock
"With the oldInterpreter ready to execute code, evaluate aBlock,
then return the interpreter (and the heap) to the ``just snapshotted'' state."
+ | savedpc savedfp initialContext finalContext |
- | savedpc initialContext finalContext |
sim
initStackPages;
loadInitialContext;
internalizeIPandSP.
- initialContext := sim frameContext: sim localFP.
savedpc := sim localIP.
+ savedfp := sim localFP.
- sim objectMemory hasSpurMemoryManagerAPI ifFalse:
- [sim objectMemory pushRemappableOop: initialContext].
"sim printHeadFrame."
aBlock value.
"sim printHeadFrame."
sim
internalPush: sim localIP;
externalizeIPandSP.
"now undo the execution state"
+ self assert: sim localFP = savedfp.
+ initialContext := sim frameContext: savedfp.
finalContext := sim voidVMStateForSnapshotFlushingExternalPrimitivesIf: false.
- sim objectMemory hasSpurMemoryManagerAPI ifFalse:
- [initialContext := sim objectMemory popRemappableOop].
self assert: initialContext = finalContext.
self assert: sim localIP = savedpc.
sim objectMemory
storePointer: SuspendedContextIndex
ofObject: sim activeProcess
withValue: finalContext!
Item was changed:
----- Method: SpurBootstrap>>allocateClassTable (in category 'bootstrap image') -----
allocateClassTable
"Allocate the root of the classTable plus enough pages to accomodate all classes in
the classToIndex map. Don't fill in the entries yet; the classes have yet to be cloned."
| tableRoot page maxSize numPages |
tableRoot := newHeap
allocateSlots: newHeap classTableRootSlots + newHeap hiddenRootSlots
format: newHeap arrayFormat
classIndex: newHeap arrayClassIndexPun.
self assert: (newHeap numSlotsOf: tableRoot) = (newHeap classTableRootSlots + newHeap hiddenRootSlots).
self assert: (newHeap formatOf: tableRoot) = newHeap arrayFormat.
self assert: (newHeap classIndexOf: tableRoot) = newHeap arrayClassIndexPun.
newHeap nilFieldsOf: tableRoot.
"first page is strong"
page := newHeap
allocateSlots: newHeap classTablePageSize
format: newHeap arrayFormat
classIndex: newHeap arrayClassIndexPun.
self assert: (newHeap numSlotsOf: page) = newHeap classTablePageSize.
self assert: (newHeap formatOf: tableRoot) = newHeap arrayFormat.
self assert: (newHeap classIndexOf: tableRoot) = newHeap arrayClassIndexPun.
self assert: (newHeap objectAfter: tableRoot limit: newHeap freeStart) = page.
lastClassTablePage := page.
newHeap nilFieldsOf: page.
newHeap storePointer: 0 ofObject: tableRoot withValue: page.
+ newHeap setHiddenRootsObj: tableRoot.
- newHeap hiddenRootsObj: tableRoot.
maxSize := classToIndex inject: 0 into: [:a :b| a max: b].
numPages := (maxSize + newHeap classTableMinorIndexMask / newHeap classTablePageSize) truncated.
2 to: numPages do:
[:i|
page := newHeap
allocateSlots: newHeap classTablePageSize
format: newHeap arrayFormat
classIndex: newHeap arrayClassIndexPun.
self assert: (newHeap numSlotsOf: page) = newHeap classTablePageSize.
self assert: (newHeap formatOf: page) = newHeap arrayFormat.
self assert: (newHeap classIndexOf: page) = newHeap arrayClassIndexPun.
newHeap fillObj: page numSlots: newHeap classTablePageSize with: newHeap nilObject.
newHeap storePointer: i - 1 ofObject: tableRoot withValue: page.
self assert: (newHeap objectAfter: (newHeap fetchPointer: i - 2 ofObject: tableRoot) limit: newHeap freeStart) = page.
lastClassTablePage := page].
"and once again to recompute numClassTablePages post building the class table."
newHeap instVarNamed: 'numClassTablePages' put: nil.
+ newHeap setHiddenRootsObj: tableRoot!
- newHeap hiddenRootsObj: tableRoot!
More information about the Vm-dev
mailing list