• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

steve-downey / compile-time-scheme / 30234135800

27 Jul 2026 03:14AM UTC coverage: 91.378% (+0.2%) from 91.136%
30234135800

push

github

steve-downey
Merge step L16: special variables and dynamic binding (Track A)

let of a symbol marked special by defvar/defparameter now binds
dynamically, setq of a special assigns the innermost dynamic binding, and
every exit path restores -- normal completion, return-from, and throw --
by reusing L15's unwind-protect shape rather than growing a second unwind
path. Parity in both evaluators, as L14 and L15 required.

The save/restore records go on a stack owned by env_arena, beside L15's
catch frames, for L15's reason: env is copied to make a lexical capture,
so a saved value living there would be duplicated into every closure
materialized inside the extent, each copy independently restorable. The
special *mark* is the mirror image -- lexical information, deliberately
carried across copies -- and EnvTest - DynamicBindingsAreNotCarriedByAnEnvCopy
pins both halves. Shallow binding means a special has one store cell, so
env::set_value is unchanged and setq of a special needs no case analysis
at all.

Merge criteria are the plan's, plus a lexical control the worker added on
its own initiative: the same program shape over a never-declared name must
answer 1, because "returns 2" alone is equally consistent with having
broken let into a global assignment. That is the test that makes the
criterion mean what it claims.

Orchestrator verification: make compile (0, and warning-free on a forced
full rebuild of the smdlisp tree), make test (646/646), make lint (all
hooks), verify-transclusions (56 resolved, 0 failures). Diff confined to
closure/ plus docs; elaborator/ needed no change because let/let* already
lower to lambda applications; smdscheme untouched. Three new UUID anchor
pairs, none nested, none deleted -- every pair in the touched files still
opens and closes before the next opens.

DIV-0014 filed: dynamically binding a special with no value is a diagnosed
error, since shallow binding has no cell to save.

MaxBindings==16 was declined and stays open; see the follow... (continued)

341 of 348 new or added lines in 6 files covered. (97.99%)

1 existing line in 1 file now uncovered.

8892 of 9731 relevant lines covered (91.38%)

224.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.88
/src/smd/smdlisp/closure/cps_code.test.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc