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

rieske / trans / 34124257751
94%
master: 95%

Build:
Build:
LAST BUILD BRANCH: refactor-stackmachine-emit-visitor-split
DEFAULT BRANCH: master
Ran 07 Sep 2026 12:57PM UTC
Jobs 1
Files 274
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 12:52PM UTC coverage: 94.419% (+0.002%) from 94.417%
34124257751

Pull #299

github

rieske
refactor: one record for the open function scope

SymbolTable kept two members encoding the same fact: functionScopes, a
vector that could never exceed size 1 because C has no nested function
definitions, and scopeIdStack, the block nesting inside it.
isAtFileScope() was defined on the second while guarding reads of the
first, so when enterBlockScope() pushed a scope id with no function
scope open the predicate claimed a function was open and
functionScopes.back() ran on an empty vector.

That state has been patched twice already, once by moving the
predicate onto the stack it guards and once by rejecting the construct
that produced it. Collapsing the two members into a single
optional<FunctionScope> removes the disagreement instead: there is one
place recording whether a function is open, so no future change can
update one and leave the other stale.

Every access goes through openFunction(), which throws rather than
reading an empty container. That covers five public entry points -
enterBlockScope, exitBlockScope, endFunction, getCurrentScopeSymbols
and getCurrentScopeArguments - which were undefined behaviour on an
empty vector before and were guarded by nothing.

nextScopeId stays outside the optional: block ids must not repeat
across functions, since frame-local object names embed them.

The unit test that pinned the old workaround is replaced by one
asserting the state is now refused, and a characterization test covers
the cross-function id invariant that the collapse must not break.
Pull Request #299: refactor: one record for the open function scope

15581 of 16502 relevant lines covered (94.42%)

155803.6 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
97.04
0.09% home/runner/work/trans/trans/src/semantic_analyzer/SymbolTable.cpp
Jobs
ID Job ID Ran Files Coverage
1 34124257751.1 07 Sep 2026 12:57PM UTC 274
94.42
GitHub Action Run
Source Files on build 34124257751
  • Tree
  • List 274
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34124257751
  • Pull Request #299
  • PR Base - master (#34118940464)
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