Repository navigation
Trace each SPLIT branch as its own ray - #414
Merged
Merged
Conversation
All SPLIT branches of a particle were traced in one ENTER/LEAVE block, so mcdisplay drew a return line from each branch end back to the SPLIT point. Matches mccode-dev/McCode#3159. Fixes #413. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #413.
In trace mode, all SPLIT branches of a particle were in one
ENTER:...LEAVE:block, somcdisplaydrew a "return line" from the end of each branch back to the SPLIT point. The SPLIT loop now emitsDEBUG_LEAVE(); DEBUG_STATE(); DEBUG_ENTER(); DEBUG_STATE();before restoring the particle for the second and later branches, so each branch is a separate ray. Only trace output changes.Same one-line change as the classic code generator in mccode-dev/McCode#3159, so the generated C stays equivalent.
Verified: the new
tests/test_split_trace.pyfails without the change and passes with it (run directly with Python 3.14 on macOS arm64, without pytest, so the full suite was not run). The behaviour itself (separate rays in the trace and inmcdisplay) was checked with the McCode change.🤖 Generated with Claude Code