Skip to content

Add free builtins and pipe call support - #77

Merged
itsfuad merged 1 commit into
mainfrom
feature/free-builtins-pipe
Aug 14, 2026
Merged

Add free builtins and pipe call support#77
itsfuad merged 1 commit into
mainfrom
feature/free-builtins-pipe

Conversation

@itsfuad

@itsfuad itsfuad commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

  • distinguish dynamic-array owners []T from reference-only slice views [..]T
  • add free-function pipe calls with semantic argument-zero borrowing and single evaluation
  • replace compiler-owned intrinsic methods with registry-driven free functions
  • mutate dynamic-array owners in place through &mut []T
  • index LSP operation completion and share canonical symbol rendering
  • fix borrowed-owner slice carrier loading and malformed alloc handling

Validation

  • GOCACHE=/tmp/peeper-go-cache CCACHE_DISABLE=1 go test -count=1 ./...
  • GOCACHE=/tmp/peeper-go-cache CCACHE_DISABLE=1 go vet ./...
  • GOCACHE=/tmp/peeper-go-cache CCACHE_DISABLE=1 go test -race -count=1 ./internal/lsp
  • GOCACHE=/tmp/peeper-go-cache CCACHE_DISABLE=1 go run ./scripts/bundle.go
  • bundled check and run fixtures for pipe calls, borrowed-owner slices, dynamic-array growth, and shrink
  • negative fixtures for direct implicit borrow, immutable mutation, operation value use, slice growth, missing alloc value, and piped alloc arity
  • amd64 and 386 LLVM carrier regressions

Tracking

Closes #76.
Progresses #29.
Follow-up: #74.

Future constraints

Auto-import must reuse semantic catalog provenance, avoid dependency-graph rescans, preserve non-empty arguments, and compose import edits with UTF-16-safe operation edits.

Distinguish dynamic-array owners from reference-only slices and lower pipe calls with semantic argument-zero adaptation.

Move compiler operations to registry-driven free functions, index LSP operation completion, and unify symbol rendering. Fix borrowed-owner slice lowering plus alloc arity and invalid-call ownership handling.

Validation: go test -count=1 ./...; go vet ./...; go test -race -count=1 ./internal/lsp; bundle; 32/64-bit backend regressions; affected positive and negative Peeper fixtures.
@itsfuad itsfuad added this to the 0.2 Language Foundations milestone Aug 14, 2026
@itsfuad itsfuad added enhancement New feature or request runtime-lowering HIR/MIR/backend runtime lowering work language-model Peeper language model, ownership, pointer, optional, array/slice work labels Aug 14, 2026
@itsfuad
itsfuad merged commit 392d610 into main Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request language-model Peeper language model, ownership, pointer, optional, array/slice work runtime-lowering HIR/MIR/backend runtime lowering work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add free builtins and pipe call support

1 participant