-
Notifications
You must be signed in to change notification settings - Fork 64
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
Many gcs #653
base: pharo-12
Are you sure you want to change the base?
Many gcs #653
Conversation
Co-authored-by: Guille Polito <guillermopolito@gmail.com> Co-authored-by: Nahuel Palumbo <nahuel.palumbo@gmail.com>
# Conflicts: # smalltalksrc/VMMaker/SpurMemoryManager.class.st # smalltalksrc/VMMaker/StackInterpreterPrimitives.class.st # src/parameters/parameters.c
HYBRID_COMPACTOR = 1, | ||
SWEEP_COMPACTOR = 2, | ||
SELECTIVE_COMPACTOR = 3 | ||
} GarbageCollector; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so here we have some indices,
newWithExpression: (TVariableNode named: variableToTest) | ||
selectors: (possibleClasses collect: [ :class | | ||
class staticallyResolvePolymorphicSelector: aSendNode selector ]) | ||
arguments: aSendNode arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
|
||
self staticallyResolvedPolymorphicReceivers | ||
at: polymorphicVariable | ||
put: { typeVariable } , classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in a following iteration, we should have something better than an array here?
@@ -31,7 +31,7 @@ Class { | |||
'VMBasicConstants', | |||
'VMSpurObjectRepresentationConstants' | |||
], | |||
#category : #'VMMaker-SpurMemoryManager' | |||
#category : #'VMMaker-InterpreterSimulation' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why moved to simulation?
[:selectorToStaticallyResolve| | ||
aCCodeGenerator | ||
staticallyResolveMethodNamed: selectorToStaticallyResolve | ||
forClass: self | ||
to: (self staticallyResolvePolymorphicSelector: selectorToStaticallyResolve)]]] | ||
to: (self staticallyResolvePolymorphicSelector: selectorToStaticallyResolve)]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
|
||
" gcType caseOf: { | ||
[ 0 ] -> [ planningCompactor postSwizzleAction ]. | ||
[ 1 ] -> [ sweepCompactor postSwizzleAction ]. | ||
ONLY SELECTIVE | ||
}. | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" gcType caseOf: { | |
[ 0 ] -> [ planningCompactor postSwizzleAction ]. | |
[ 1 ] -> [ sweepCompactor postSwizzleAction ]. | |
ONLY SELECTIVE | |
}. | |
" | |
compactor postSwizzleAction. |
?
from: ObjStackFreex | ||
to: ObjStackNextx + (self rawHashBitsOf: stackOrNil). | ||
to: ObjStackNextx + (self rawHashBitsOf: stackOrNil) ]. | ||
}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this one needs polymorphism :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, actually not, if we are here we know the compactor is always a planning compactor. Maybe we need to move this method to the compactor
from: ObjStackFreex | ||
to: ObjStackFreex. | ||
to: ObjStackFreex ]. | ||
}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -69,6 +70,7 @@ EXPORT(int) vm_init(VMParameters* parameters) | |||
setMaxOldSpaceSize(parameters->maxOldSpaceSize); | |||
setDesiredEdenBytes(parameters->edenSize); | |||
setMinimalPermSpaceSize(parameters->minPermSpaceSize); | |||
setGarbageCollectorType(parameters->garbageCollector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setGarbageCollectorType(parameters->garbageCollector); | |
setGarbageCollectorType(parameters->garbageCollector); |
parameters->garbageCollector = PLANNING_COMPACTOR; | ||
|
||
return VM_SUCCESS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes in this file are hidden in the re-formatting. Even hiding white spaces in the PR shows a lot of noise... It would have been nice to not have it...
(There is still a problem to transform different methods with the same selector)
Done in DojoVM - Douai edition (and more)!
Merged changes in #649 (I cannot point to it because it comes from a fork, even though we work in the same team 😞)
So, this PR includes: