[Pharo-dev] [Reflectivity] AST Link Annotation Infrastructure

Marcus Denker marcus.denker at inria.fr
Sun Mar 1 04:29:31 EST 2015


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20150301/d79082ad/attachment.html>


More information about the Pharo-dev mailing list