refactor(effs): share the audio ring through // @src - #949
Closed
This-Is-NPC wants to merge 1 commit into
Closed
This-Is-NPC wants to merge 1 commit into
This-Is-NPC wants to merge 1 commit into
Conversation
audio_open/write/close C copied the same IO_RING block so each file compiled alone. eff_src already dedupes a path; a // @src line lets that seen-set include the ring, so a program that imports more than one effect still emits one copy.
Contributor
|
Thank you for this. The same duplication is gone in 2.0.25 through PR #939, which reaches the one-copy result with the realpath dedup Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The C files for Audio.open, Audio.write and Audio.close each carried the same
157-line IO_RING block so any one of them compiled alone. The generated
program then pasted that block three times.
eff_src already skipped a path it had seen. A
// @src name.cline nowloads a sibling through that same set, so the three effects share
audio_ring.cand a program that imports more than one still emits onecopy. A lone effect still compiles: it pulls the ring itself.
JS is unchanged (the silent stub has no ring). Isolated
tests/io/audio_open.bendpassed interp, JS and C; the generated C has#ifndef IO_RINGonce.Repo: 545 → 231 lines in the audio effects, +2 in
eff_src(−315 net).