Skip to content

[mypyc] Generate names lazily when pretty-printing IR or generating C#9767

Merged
JukkaL merged 7 commits into
masterfrom
refactor-env
Nov 29, 2020
Merged

[mypyc] Generate names lazily when pretty-printing IR or generating C#9767
JukkaL merged 7 commits into
masterfrom
refactor-env

Conversation

@JukkaL
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL commented Nov 29, 2020

Instead of generating names for ops when building IR, we now generate names
immediately before pretty-printing or generating C. This simplifies Environment
and reduces the amount of mutable state we need to maintain. This a step
towards removing the mypyc.ir.ops.Environment class.

Move code related to pretty-printing to mypyc.ir.pprint.

Work on mypyc/mypyc#781.

@JukkaL
Copy link
Copy Markdown
Collaborator Author

JukkaL commented Nov 29, 2020

I'm going to merge this as soon as the builds are green, since I have several other PRs I want to create that depend on this (and this doesn't change behavior).

@JukkaL JukkaL merged commit f0c78c1 into master Nov 29, 2020
@JukkaL JukkaL deleted the refactor-env branch November 29, 2020 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant