Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate IrMemberAccessExpression #5107

Merged
merged 7 commits into from Apr 12, 2023

Conversation

mcpiroman
Copy link
Contributor

This PR completes #4560 by generating the last left over element class. That fix allows further bulk operations and experiments involving the whole tree.

Most significantly the valueArguments and typeArguments lists were converted from arrays to (preallocated) MutableLists.
One outcome is that it's now possible to work with them like with regular lists instead of throught the getValueArgument/putTypeArgument methods. OOTH the everything still uses the latter. But it should be possible to inline those methods with a refactoring action for the whole codebase if that's desired.

The other thing is possible performance regression.I have not run any benchamrk but I'm keen on seeing its results.

@udalov udalov self-assigned this Mar 6, 2023
@udalov udalov added the Backend label Mar 6, 2023
@mcpiroman mcpiroman force-pushed the autogen-IrMemberAccessExpression branch from afab144 to 3018aa7 Compare March 21, 2023 21:27
@mcpiroman
Copy link
Contributor Author

I assume the Array -> MutableList change can be quite impactful, so I restored those fields back to arrays.

@mcpiroman mcpiroman force-pushed the autogen-IrMemberAccessExpression branch from 3018aa7 to e94db0b Compare March 21, 2023 21:43
@udalov
Copy link
Member

udalov commented Mar 22, 2023

Could you please rework your branch to collapse the first and the last commit and remove them, thus avoiding unnecessary changes?

@mcpiroman mcpiroman force-pushed the autogen-IrMemberAccessExpression branch from e94db0b to e3665fa Compare March 23, 2023 11:04
@mcpiroman
Copy link
Contributor Author

Done. I also removed fields with empty arrays, so now performance should be on pair.

@mcpiroman mcpiroman force-pushed the autogen-IrMemberAccessExpression branch from e3665fa to a063bcc Compare March 23, 2023 13:44
@JetBrains JetBrains deleted a comment Mar 24, 2023
@mcpiroman mcpiroman force-pushed the autogen-IrMemberAccessExpression branch from a063bcc to a8eeede Compare March 27, 2023 14:20
udalov and others added 7 commits April 12, 2023 19:47
Except `putTypeArguments`, which is moved to psi2ir where it's used.
To help git understand that IrMemberAccessExpression is moved in the
subsequent commits where it's changed to be auto-generated.
Align it with all other element types where origin is mutable.
This was left unchanged previously probably because the
IrMemberAccessExpression was not handled by the tree generator.
@udalov udalov force-pushed the autogen-IrMemberAccessExpression branch from a8eeede to 2417e98 Compare April 12, 2023 17:48
@udalov udalov merged commit 7a189dc into JetBrains:master Apr 12, 2023
@udalov
Copy link
Member

udalov commented Apr 12, 2023

Merged with a couple of minor changes. Thank you for the contribution!

@mcpiroman mcpiroman deleted the autogen-IrMemberAccessExpression branch May 2, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants