Skip to content

Commit

Permalink
In a discusstion with Manuel we realized that we do not need the ASTC…
Browse files Browse the repository at this point in the history
…acheReset for Metalinks: if we inatall a link, we have a Reflective Method. This hold on to the AST. Thus instead of keeping it in the cache, we can just by default ask the reflective method if it exists.
  • Loading branch information
MarcusDenker committed Nov 23, 2019
1 parent f5c7931 commit ed9ac8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/AST-Core/ASTCache.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ ASTCache >> at: aCompiledMethod [
^ self
at: aCompiledMethod
ifAbsentPut: [
aCompiledMethod parseTree doSemanticAnalysisIn: aCompiledMethod methodClass ]
aCompiledMethod reflectiveMethod
ifNil: [ aCompiledMethod parseTree doSemanticAnalysisIn: aCompiledMethod methodClass ]
ifNotNil: [: rfMethod | rfMethod ast ] ]
]

{ #category : #initialization }
Expand Down
7 changes: 1 addition & 6 deletions src/Reflectivity/ReflectiveMethod.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ ReflectiveMethod >> compiledMethod: aCompiledMethod [

compiledMethod := aCompiledMethod.
class := aCompiledMethod methodClass.
ast := compiledMethod ast.

SystemAnnouncer uniqueInstance weak
when: ASTCacheReset
send: #reinstallASTInCache
to: self
ast := compiledMethod ast
]

{ #category : #invalidate }
Expand Down

0 comments on commit ed9ac8e

Please sign in to comment.