> - code gen for the complex hooks (need to add name analysis for hooks for
> that)
>
This is now in 50063.
It does work (for now) only for for #object as a parameter and not yet on all
kinds of nodes, but the
machinery is working…
For a very simple example, see #testLinkWithMetaArg:
We can define a Metalink were we hand over reified information from the base
level to the
meta object:
link := MetaLink new
metaObject: self; “meta object is the test class
itself"
selector: #tagExec:; “we call that method, it just stored
the parameter in an ivar tag"
arguments: #(object). “arguments are defined by symbols,
there is plug architecture to define them"
in this case, it is the object at runtime of the method where we install the
link in.
Lets grab a send node:
sendNode := (ReflectivityExamples>>#exampleMethod) ast body statements
first value.
install the link:
sendNode link: link.
#tagExec: is just recording the parameter, so this will be green:
instance := ReflectivityExamples new.
self assert: (instance exampleMethod = 5).
self assert: (tag = instance).
And it works!
TODO next:
- add all possible reifications (#arguments, #context, #newvalue,
#name…. depending on
where the link is installed on, we are interesting in different
things).
Marcus