Re: [EXT] Duplicate visits to expressions defined in RHS of a setter

2023-04-04 Thread Saravanan Palanichamy
Thank you Eric and Paul. I used line/col numbers to prevent duplicates. This probably is good enough for now To answer some questions, Eric, I am not able to do this before instruction selection because I want the static compile to finish its resolutions and I use the metadata gathered in that

Re: [EXT] Duplicate visits to expressions defined in RHS of a setter

2023-04-03 Thread Paul King
Good suggestions from Eric. Another is that you can "drop some breadcrumbs", i.e. place a "seen" node metadata marker and skip the next time around. This falls into the category of a workaround rather than a fix for your expectation, but we do legitimately walk the tree multiple times in a few

RE: [EXT] Duplicate visits to expressions defined in RHS of a setter

2023-04-03 Thread Milles, Eric (TR Technology) via dev
You can try visiting at an earlier compile phase (maybe before instruction selection) to see the AST before some SC transforms are applied. Otherwise, I have used the source location as a key to understand if something is coming in again. Often generated methods will include some of the

Duplicate visits to expressions defined in RHS of a setter

2023-04-01 Thread Saravanan Palanichamy
Hello Groovy Devs - I have a class defined MyTestClass in java/kotlin (does not matter) - I have a groovy class defined MyClassDefinedInGroovy - I have code in a groovy function that is creating these classes and setting a variable in the object. I compile this with static compilation