Skip to content

Commit

Permalink
Merge pull request #623 from BastouP411/dojo
Browse files Browse the repository at this point in the history
Added comments and renamed methods during todays dojo
  • Loading branch information
guillep authored Jun 21, 2023
2 parents cefbe12 + a46ce4f commit ac54bfa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions smalltalksrc/VMMaker/CogMethodZone.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CogMethodZone >> addAllToYoungReferrers [
]

{ #category : #accessing }
CogMethodZone >> addToOpenPICList: anOpenPIC [
CogMethodZone >> addToMegamorphicICList: anOpenPIC [
<var: #anOpenPIC type: #'CogMethod *'>
self assert: anOpenPIC cmType = CMMegamorphicIC.
self assert: (openPICList == nil
Expand Down Expand Up @@ -249,7 +249,7 @@ CogMethodZone >> compactCompiledCode [
SistaVM ifTrue:
[self clearSavedPICUsageCount: source].
source cmType = CMMegamorphicIC ifTrue:
[self addToOpenPICList: source].
[self addToMegamorphicICList: source].
methodCount := methodCount + 1.
source := self methodAfter: source].
source >= self limitZony ifTrue:
Expand All @@ -275,7 +275,7 @@ CogMethodZone >> compactCompiledCode [
[SistaVM ifTrue:
[self clearSavedPICUsageCount: dest].
dest cmType = CMMegamorphicIC ifTrue:
[self addToOpenPICList: dest]].
[self addToMegamorphicICList: dest]].
dest cmUsageCount > 0 ifTrue:
[dest cmUsageCount: dest cmUsageCount // 2].
dest := coInterpreter
Expand Down Expand Up @@ -740,6 +740,12 @@ CogMethodZone >> quickClearCogCompiledCode [

{ #category : #'young referers' }
CogMethodZone >> relocateAndPruneYoungReferrers [
"This method compacts the young referrers array, and updates the references to the methods were moved."

"Young referrers is an array that holds references to CogMethods that references objects that are in the new space.
The young referrers array is stored at the end of the code cache, it grows towards lower addresses.
The variable youngReferrers points to the lowest entry in the array, and it spans up to the limitAddress"

| source dest next cogMethod |
<var: #source type: #usqInt>
<var: #dest type: #usqInt>
Expand Down
2 changes: 1 addition & 1 deletion smalltalksrc/VMMaker/Cogit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6412,7 +6412,7 @@ Cogit >> fillInOPICHeader: pic numArgs: numArgs selector: selector [
pic objectHeader: 0.
pic blockSize: openPICSize.
"pic methodObject: 0.""This is also the nextOpenPIC link so don't initialize it"
methodZone addToOpenPICList: pic.
methodZone addToMegamorphicICList: pic.
pic methodHeader: 0.
pic selector: selector.
pic cmNumArgs: numArgs.
Expand Down

0 comments on commit ac54bfa

Please sign in to comment.