[Reflectivity] AST Link Annotation Infrastructure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Reflectivity] AST Link Annotation Infrastructure

Marcus Denker-4
Hi,

For review:


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