Skip to content

Add shared tagged variant core - #88

Open
itsfuad wants to merge 1 commit into
feature/optional-narrowingfrom
feature/tagged-variant-core
Open

Add shared tagged variant core#88
itsfuad wants to merge 1 commit into
feature/optional-narrowingfrom
feature/tagged-variant-core

Conversation

@itsfuad

@itsfuad itsfuad commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • lower optionals and future enums through one tagged-variant descriptor and IR operation family
  • replace optional-specific HIR, MIR, place, flow, and LLVM machinery with case-aware variant operations
  • preserve ?T/none, optional ownership rules, and exact tagged optional ABI
  • add exhaustive variant switching, typed payload slots, active-case drops, and declaration-owned nominal identity
  • preserve issue Add optional narrowing and payload access #28 narrowing behavior, including alias invalidation and eager boolean evaluation

Validation

  • CCACHE_DISABLE=1 GOCACHE=/tmp/peeper-go-cache go test -count=1 ./...
  • CCACHE_DISABLE=1 GOCACHE=/tmp/peeper-go-cache go vet ./...
  • CCACHE_DISABLE=1 GOCACHE=/tmp/peeper-go-cache go test -race -count=1 ./...
  • CCACHE_DISABLE=1 GOCACHE=/tmp/peeper-go-cache bash scripts/build.sh
  • PEEPER_BIN="$PWD/build/bin/peeper" CCACHE_DISABLE=1 GOCACHE=/tmp/peeper-go-cache go test -count=1 ./x_test
  • git diff --check

Boundaries

  • no public enum construction or matching syntax in this PR
  • general named-type applications follow in a separate stacked PR
  • compact union payload storage remains deferred
  • optional niche layout remains Add optional niche layouts #30

Stacked on #87. Does not merge or close #28.

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.

1 participant