Skip to content

feat(cfc): storage mode (REF= assignment) - #1891

Open
volsa wants to merge 1 commit into
vosa/execution-controlfrom
vosa/ref-assignment
Open

feat(cfc): storage mode (REF= assignment)#1891
volsa wants to merge 1 commit into
vosa/execution-controlfrom
vosa/ref-assignment

Conversation

@volsa

@volsa volsa commented Aug 27, 2026

Copy link
Copy Markdown
Member

Problem: The IDE allows for a REF= storage mode similar to set/reset (see #1851), the transpiler however does not support that case.

Solution: Adapt the data model, support REF= assignments for data sinks. Transpile such data sinks into a simple <left> REF= <right> assignment and (mostly) rely on the compilers validation for invalid cases.

Refs: PRG-4533

@volsa volsa changed the title feat(cfc): storage mode (reference) for REF= assignments feat(cfc): storage mode (REF= assignment) Aug 27, 2026
Problem: The IDE defines a REF= storage mode on data sinks beside
Set/Reset, re-pointing a REFERENCE TO sink at its source. The compiler
had no such mode, so reference assignments could not be drawn in CFC.

Solution: Extend the storage enum with a Reference mode and lower such
sinks to `sink REF= source`, reusing the core compiler's reference
assignment validation and codegen. An address has no negation, so a
negation bubble anywhere on a REF= wire is rejected with E154.

Refs: PRG-4533

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@volsa
volsa force-pushed the vosa/ref-assignment branch from 9ba5ace to 69291e2 Compare August 27, 2026 07:14
@volsa
volsa marked this pull request as ready for review August 27, 2026 07:19
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Build Artifacts

🪟 Windows

Artifact Link Size
stdlib.lib Download 4.0 MB
stdlib.dll Download 0.1 MB
plc.exe Download 38.3 MB

From workflow run

🐧 Linux

Artifact Link Size
deb-aarch64 Download 30.8 MB
plc-aarch64 Download 43.4 MB
deb-x86_64 Download 38.4 MB
schema Download 0.0 MB
stdlib Download 32.3 MB
plc-x86_64 Download 43.5 MB

From workflow run

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