[Vm-dev] VM Maker: Cog-eem.102.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Oct 1 21:46:18 UTC 2013
Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.102.mcz
==================== Summary ====================
Name: Cog-eem.102
Author: eem
Time: 1 October 2013, 2:46:06.275 pm
UUID: daf20775-e09f-46a3-9382-fd3732f16597
Ancestors: Cog-eem.101
Change the bootstrap to leave room for JIT structures, i.e. the
stackZone and rump C stack.
Refactor launch:headerFlags: into launch:simulatorClass:headerFlags:
allowing launching a CoInterpreter/Cogit on the bootstrap image.
=============== Diff against Cog-eem.101 ===============
Item was added:
+ ----- Method: SpurBootstrap>>coHeapFrom: (in category 'testing') -----
+ coHeapFrom: aSpur32BitMMLESimulator
+ | coHeap |
+ coHeap := Spur32BitMMLECoSimulator new.
+ aSpur32BitMMLESimulator class allInstVarNames do:
+ [:ivn|
+ coHeap instVarNamed: ivn put: (aSpur32BitMMLESimulator instVarNamed: ivn)].
+ coHeap scavenger instVarNamed: 'manager' put: coHeap.
+ ^coHeap!
Item was changed:
----- Method: SpurBootstrap>>launch (in category 'testing') -----
launch
+ self launch: newHeap
+ simulatorClass: StackInterpreterSimulator
+ headerFlags: oldInterpreter getImageHeaderFlags!
- self launch: newHeap headerFlags: oldInterpreter getImageHeaderFlags!
Item was removed:
- ----- Method: SpurBootstrap>>launch:headerFlags: (in category 'testing') -----
- launch: heap headerFlags: headerFlags
- | sim |
- sim := StackInterpreterSimulator onObjectMemory: heap.
- heap coInterpreter: sim.
- sim
- initializeInterpreter: 0;
- setImageHeaderFlagsFrom: headerFlags;
- imageName: ImageName;
- flushExternalPrimitives;
- openAsMorph;
- transcript: Transcript. "deep copy copies this"
- "sim
- instVarNamed: 'printSends' put: true;
- instVarNamed: 'printReturns' put: true;
- instVarNamed: 'methodDictLinearSearchLimit' put: SmallInteger maxVal." "for now"
- heap
- setCheckForLeaks: 15;
- runLeakCheckerForFullGC: true.
-
- sim halt; run!
Item was added:
+ ----- Method: SpurBootstrap>>launch:simulatorClass:headerFlags: (in category 'testing') -----
+ launch: heap simulatorClass: simulatorClass headerFlags: headerFlags
+ | sim |
+ sim := simulatorClass onObjectMemory: heap.
+ heap coInterpreter: sim.
+ (sim class allInstVarNames includes: 'cogCodeSize')
+ ifTrue:
+ [sim
+ initializeInterpreter: 0;
+ instVarNamed: 'heapBase' put: heap startOfMemory;
+ instVarNamed: 'numStackPages' put: 8;
+ instVarNamed: 'cogCodeSize' put: 1024*1024;
+ moveMethodCacheToMemoryAt: sim cogCodeSize + sim computeStackZoneSize;
+ initializeCodeGenerator]
+ ifFalse:
+ [sim initializeInterpreter: 0].
+ sim
+ setImageHeaderFlagsFrom: headerFlags;
+ imageName: ImageName;
+ flushExternalPrimitives;
+ openAsMorph;
+ transcript: Transcript. "deep copy copies this"
+ "sim
+ instVarNamed: 'printSends' put: true;
+ instVarNamed: 'printReturns' put: true;
+ instVarNamed: 'methodDictLinearSearchLimit' put: SmallInteger maxVal." "for now"
+ heap
+ setCheckForLeaks: 15;
+ runLeakCheckerForFullGC: true.
+
+ sim halt; run!
Item was changed:
----- Method: SpurBootstrap>>launchSaved (in category 'testing') -----
launchSaved
+ self launch: TransformedImage veryDeepCopy
+ simulatorClass: StackInterpreterSimulator
+ headerFlags: ImageHeaderFlags!
- self launch: TransformedImage veryDeepCopy headerFlags: ImageHeaderFlags!
Item was added:
+ ----- Method: SpurBootstrap>>launchSavedWithJIT (in category 'testing') -----
+ launchSavedWithJIT
+ self launch: (self coHeapFrom: TransformedImage veryDeepCopy)
+ simulatorClass: CogVMSimulator
+ headerFlags: ImageHeaderFlags!
Item was changed:
----- Method: SpurBootstrap>>on: (in category 'initialize-release') -----
on: imageName
StackInterpreter initializeWithOptions: Dictionary new.
oldInterpreter := StackInterpreterSimulator new.
oldInterpreter openOn: imageName extraMemory: 0.
oldHeap := oldInterpreter objectMemory.
newHeap := Spur32BitMMLESimulator new.
newHeap
allocateMemoryOfSize: (oldHeap youngStart * 3 / 2 roundUpTo: 1024 * 1024)
newSpaceSize: 1024 * 1024
+ stackSize: 1024 * 1024
codeSize: 1024 * 1024.
newHeap setCheckForLeaks: 15 - 4. "don't check become; soooo many rehashes in bootstrap"
map := Dictionary new: oldHeap memory size // 4.
reverseMap := Dictionary new: oldHeap memory size // 4.
classToIndex := Dictionary new: 1024.
literalMap := IdentityDictionary new.
methodClasses := Set new.
installedPrototypes := Set new!
More information about the Vm-dev
mailing list