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