Skip to content

Update boosttrap p12 #876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: pharo-12
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions smalltalksrc/VMMaker/SpurMemoryManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,21 @@ SpurMemoryManager >> allocateMemoryOfSize: memoryBytes initialAddress: initialAd
^ memoryManager allocate: memoryBytes desiredPosition: initialAddress
]

{ #category : 'initialization' }
SpurMemoryManager >> allocateMemoryOfSize: memoryBytes newSpaceSize: newSpaceBytes stackSize: stackBytes codeSize: codeBytes [
"Add default values for bootstrapping"

self
allocateMemoryOfSize: memoryBytes
newSpaceSize: newSpaceBytes
stackSize: stackBytes
codeSize: codeBytes
methodCacheSize: 0
primitiveTraceLogSize: 0
rumpCStackSize: 0
permSpaceSize: 0
]

{ #category : 'initialization' }
SpurMemoryManager >> allocateMemoryOfSize: memoryBytes newSpaceSize: newSpaceBytes stackSize: stackBytes codeSize: codeBytes methodCacheSize: methodCacheSize primitiveTraceLogSize: primitiveLogSize rumpCStackSize: rumpCStackSize permSpaceSize: permSpaceSize [

Expand Down Expand Up @@ -1978,10 +1993,6 @@ SpurMemoryManager >> allocateMemoryOfSize: memoryBytes newSpaceSize: newSpaceByt
newSpaceActualBytes := memoryMap newSpaceEnd - memoryMap newSpaceStart.

self assert: newSpaceActualBytes >= newSpaceBytes.

freeStart := newSpaceActualBytes + memoryMap newSpaceStart.

scavengeThreshold := memoryMap newSpaceStart.

scavenger := SpurGenerationScavenger simulatorClass new.
scavenger manager: self.
Expand All @@ -1990,6 +2001,8 @@ SpurMemoryManager >> allocateMemoryOfSize: memoryBytes newSpaceSize: newSpaceByt
newSpaceBytes: newSpaceActualBytes
survivorBytes: newSpaceActualBytes // self scavengerDenominator.

self initializeNewSpaceVariables.

compactor := self class compactorClass simulatorClass new
manager: self;
yourself.
Expand Down Expand Up @@ -4771,7 +4784,7 @@ SpurMemoryManager >> ensureMemoryManager [

<doNotGenerate>

memoryManager ifNil: [
^ memoryManager ifNil: [
memoryManager := SlangMemoryManager new.
memoryManager wordSize: self wordSize ]

Expand All @@ -4787,7 +4800,7 @@ SpurMemoryManager >> ensureMemoryMap [
inSmalltalk: [
memoryMap := VMMemoryMap new.
memoryMap objectMemory: self.
memoryMap memoryManager: memoryManager ].
memoryMap memoryManager: self ensureMemoryManager ].

memoryMap initializeMemoryMap.
]
Expand Down Expand Up @@ -11791,15 +11804,6 @@ SpurMemoryManager >> rtRefCountOf: obj put: refCount [
self subclassResponsibility
]

{ #category : 'debug support' }
SpurMemoryManager >> runLeakCheckerFor: gcModes [
<inline: false>
^self
inLineRunLeakCheckerFor: gcModes
excludeUnmarkedObjs: false
classIndicesShouldBeValid: true
]

{ #category : 'debug support' }
SpurMemoryManager >> runLeakCheckerFor: gcModes excludeUnmarkedObjs: excludeUnmarkedObjs classIndicesShouldBeValid: classIndicesShouldBeValid [
<inline: false>
Expand Down
7 changes: 7 additions & 0 deletions smalltalksrc/VMMaker/StackInterpreterSimulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ StackInterpreterSimulator >> endPCOf: aMethod [
^end
]

{ #category : 'initialization' }
StackInterpreterSimulator >> ensureMemoryMap [

objectMemory ensureMemoryMap.
memoryManager := objectMemory memoryManager
]

{ #category : 'interpreter shell' }
StackInterpreterSimulator >> fetchByte [
^objectMemory byteAt: (instructionPointer := instructionPointer + 1).
Expand Down