Hi,

For review:

https://pharo.fogbugz.com/f/cases/15026/Link-installation-infrastructure-for-the-AST
 
<https://pharo.fogbugz.com/f/cases/15026/Link-installation-infrastructure-for-the-AST>

This provides the infrastructure to annotate the AST nodes with “MetaLinks”.
-> when the first link set in a method, the twin is created
-> when the last is removed, the twin is destroyed to not waste space.

testUninstallLink
        | sendNode link |
        sendNode := (ReflectivityExamples>>#exampleMethod) ast body statements 
first value.
        link := MetaLink new.
        sendNode link: link.
        (ReflectivityExamples>>#exampleMethod) class = ReflectiveMethod.
        link uninstall. 
        self assert: (ReflectivityExamples>>#exampleMethod) class = 
CompiledMethod.
        self assert: (ReflectivityExamples>>#exampleMethod) reflectiveMethod = 
nil.



        Marcus


Reply via email to