Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
 - hide free
 - move allocateParameters:using: up
  • Loading branch information
guillep committed Mar 4, 2021
1 parent 743df58 commit b935a86
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion smalltalksrc/VMMaker/SpurMemoryManager.class.st
Expand Up @@ -5775,7 +5775,7 @@ SpurMemoryManager >> freeTreeOverlapCheck [
SpurMemoryManager >> freeUnscannedEphemerons [
"Free all the memory allocated to keep the unscanned ephemerons"

memoryManager free: unscannedEphemerons start
self free: unscannedEphemerons start
]

{ #category : #'simulation only' }
Expand Down
11 changes: 11 additions & 0 deletions smalltalksrc/VMMaker/StackInterpreterPrimitives.class.st
Expand Up @@ -8,6 +8,17 @@ Class {
#category : #'VMMaker-Interpreter'
}

{ #category : #initialization }
StackInterpreterPrimitives >> allocateParameters: anInteger using: allocationBlock [
<inline: #always>

anInteger = 0 ifTrue: [ ^ nil ].

^ self
cCode: [ allocationBlock value: anInteger ]
inSmalltalk: [ CArrayAccessor on: (Array new: anInteger) ]
]

{ #category : #'primitive support' }
StackInterpreterPrimitives >> cloneContext: aContext [
| sz cloned spouseFP sp |
Expand Down
16 changes: 6 additions & 10 deletions smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st
Expand Up @@ -8,17 +8,13 @@ Class {
#category : #VMMakerTests
}

{ #category : #initialization }
{ #category : #'memory testing' }
VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [
<inline: #always>

anInteger = 0 ifTrue: [ ^ nil ].

^ self
cCode: [ allocationBlock value: anInteger ]
inSmalltalk: [ | ptr |
ptr := CArrayAccessor on: (Array new: anInteger).
allocatedElements add: ptr ]

| allocated |
allocated := super allocateParameters: anInteger using: allocationBlock.
allocatedElements add: allocated.
^ allocated
]

{ #category : #'memory testing' }
Expand Down

0 comments on commit b935a86

Please sign in to comment.