[pull] main from B-Lang-org:main#184
Merged
Merged
Conversation
Merging two mutually exclusive calls to the same Action method in one rule built a mux over the WHOLE argument. Since the port-splitting rework keeps tuple-typed method arguments as real tuple constructions through ASyntax, a whole-tuple mux def is an internal error in AVerilog (vDefMpd renders only literal tuple defs). ILift now distributes the mux over PrimPair structure (looking through ICValue references) and declines the merge when a side does not expose a tuple literal; ACleanup then merges those per element at the ASyntax level, selecting from non-literal sides with ATupleSel -- the form AState already emits and AVerilog lowers. Regression tests: SplitIfTuple (conditional calls in one rule, under the default -lift and under -no-lift) and CrossRule (calls in two mutually exclusive rules, exercising AState's per-port muxing of tuple arguments). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011X4pjSzD37mKTcPUG9Z7Gw
checkPortNames obtained the expected port count by applying the TTupleSize type function directly in its body, leaving the unreduced application to flow through to elaboration. The fix for #890 (expanding type functions when checking explicit type signatures, PR #916) makes the typechecker surface that application as a TupleSize predicate, which the declared context must then cover. Declare the proviso on checkPortNames (using valueOf n in the body) and thread TupleSize (PortsOf a) n through the three WrapMethod instances that call it. This compiles identically today and remains valid once the #890 fix lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011X4pjSzD37mKTcPUG9Z7Gw
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )