- 
  Notifications
 You must be signed in to change notification settings 
- Fork 1.1k
Direction of tree-walkign in the compiler PluginPhase #17093
-
I'm trying to write a small compiler plugin phase, which should apply to DefDefs transformation from top to bottom.
But I see default evaluation sequence is from bottom to top:
I.e, during processing next code:
object X {
 def a(): A=>B = {
 a => b
 }
}
transformDefDef at first applied to internal lambda function. X.a.$anonfun then to X.a
So, question - is it possible to change tree-walking strategy for compiler phase ?
//.btw, find a way to process only top-level defdefs
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
Answer to self after reading sources of MiniPhase/MegaPhase: no. (i.e. for excluding child nodes need to have analyzer or selection phase before our phase).
Replies: 1 comment
-
Answer to self after reading sources of MiniPhase/MegaPhase: no. (i.e. for excluding child nodes need to have analyzer or selection phase before our phase).
Beta Was this translation helpful? Give feedback.