Skip to content

fix(compiler): lower dynamic any-local operators - #319

Merged
ctate merged 1 commit into
mainfrom
codex/issue-290-dynamic-any-local
Sep 14, 2026
Merged

fix(compiler): lower dynamic any-local operators#319
ctate merged 1 commit into
mainfrom
codex/issue-290-dynamic-any-local

Conversation

@ctate

@ctate ctate commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • honor the --dynamic promise for binary operators on any locals whose values remain in checked-dynamic storage
  • preserve checked-dynamic aliases and object identity by marshaling only fallback operator operands, after native strict-equality cases
  • add C and LLVM differential coverage for numeric, string, comparison, two-dynamic-operand, typed-exit, and object-identity behavior
  • assert that static coverage reports SC2011 while dynamic coverage counts the site as compiled dynamically with no blocker

Fixes #290.

Validation

  • reporter's exact repro: static coverage reports one SC2011 site; --dynamic coverage reports 33% dynamically compiled with no blockers; execution prints 42
  • pnpm -r --filter "./packages/*" run build
  • focused C and LLVM differential tests for 2856 and the neighboring any/checked-dynamic corpus family (8 passed)
  • focused coverage contract tests (4 passed)
  • pnpm test:ts7 (140 passed; all 1,345 entries)
  • pnpm test:sandbox: all 16 environments built and every completed plain/sanitized suite was green; the managed Vercel fallback lost the sanitized 8/8 stream before command completion and its status probe returned 125 (no exit record), so the hosted gate could not report complete

pnpm lint remains red on four pre-existing main violations: unused imports in packages/cli/src/main.ts and packages/compiler/src/backend/external-c.ts, an unsafe optional-chain assertion in packages/compiler/src/backend/native-codegen.test.ts, and the pre-existing prefer-const at packages/compiler/src/frontend/lowering/lower-exprs.ts:4091. The new lowering hunks add no lint violation.

Fixes #290

Co-authored-by: Mateus Mamede Lage <23098414+mmamedel@users.noreply.github.com>
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Sep 14, 2026 5:23pm UTC

@ctate
ctate merged commit 16de852 into main Sep 14, 2026
20 checks passed
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.

SC2011: any-typed local rejected by build --dynamic even though coverage --dynamic reports the site as an eligible island site

1 participant