diff --git a/src/AST-Core/ASTCache.class.st b/src/AST-Core/ASTCache.class.st index 09efb3773bb..9f270b6742c 100644 --- a/src/AST-Core/ASTCache.class.st +++ b/src/AST-Core/ASTCache.class.st @@ -75,9 +75,12 @@ ASTCache class >> shutDown [ { #category : #accessing } ASTCache >> at: aCompiledMethod [ - ^ self - at: aCompiledMethod - ifAbsentPut: [ self class cacheMissStrategy getASTFor: aCompiledMethod ] + "for doit methods, the ast is stored in the method propery" + ^ aCompiledMethod propertyAt: #ast ifAbsent: [ + self + at: aCompiledMethod + ifAbsentPut: [ + self class cacheMissStrategy getASTFor: aCompiledMethod ] ] ] { #category : #initialization } diff --git a/src/OpalCompiler-Core/OpalCompiler.class.st b/src/OpalCompiler-Core/OpalCompiler.class.st index bebe14eb5d9..da3a91b502b 100644 --- a/src/OpalCompiler-Core/OpalCompiler.class.st +++ b/src/OpalCompiler-Core/OpalCompiler.class.st @@ -360,7 +360,8 @@ OpalCompiler >> compileDoit [ ast := RBParser parseMethod: ast formattedCode. ast compilationContext: self compilationContext. self doSemanticAnalysis. - ASTCache default at: cm put: ast. + "we store the ast in the doit method so that the debugger can read variables from the requestor" + cm propertyAt: #ast put: ast. ^cm ]