Skip to content

overhaul hook injections #24841

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

Merged
merged 4 commits into from
Apr 10, 2025
Merged

overhaul hook injections #24841

merged 4 commits into from
Apr 10, 2025

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Apr 3, 2025

ref #24764

To keep destructors injected consistently, we need to transform mAsgn properly into nkSinkAsgn and nkAsgn. This PR is the first step towards overhauling hook injections.

In this PR, hooks (except mAsgn) are treated consistently whether it is resolved in matching or instantiated by sempass2. It also fixes a spelling =wasMoved to its normalized version, which caused no replacing generic hook calls with lifted hook calls.

@ringabout ringabout changed the title wip: overhauling hook injections overhaul hook injections Apr 7, 2025
@ringabout ringabout marked this pull request as ready for review April 7, 2025 14:48
@Araq Araq merged commit 40a1ec2 into devel Apr 10, 2025
21 checks passed
@Araq Araq deleted the pr_hook_magic branch April 10, 2025 07:24
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 40a1ec2

Hint: mm: orc; opt: speed; options: -d:release
179173 lines; 8.420s; 651.844MiB peakmem

narimiran pushed a commit that referenced this pull request Apr 14, 2025
ref #24764

To keep destructors injected consistently, we need to transform `mAsgn`
properly into `nkSinkAsgn` and `nkAsgn`. This PR is the first step
towards overhauling hook injections.

In this PR, hooks (except mAsgn) are treated consistently whether it is
resolved in matching or instantiated by sempass2. It also fixes a
spelling `=wasMoved` to its normalized version, which caused no
replacing generic hook calls with lifted hook calls.

(cherry picked from commit 40a1ec2)
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.

2 participants