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

moonbitlang / core / 4782
91%

Build:
DEFAULT BRANCH: main
Ran 27 Jun 2026 03:17AM UTC
Jobs 1
Files 381
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

27 Jun 2026 03:16AM UTC coverage: 90.973%. Remained the same
4782

push

github

bobzhang
perf(builtin): make Array::swap inlineable

Follow-up to #3716. `Array::swap` is a small, hot accessor (used throughout
sorting / partitioning / shuffling) that was left out of #3716 because its
abort message carries two indices and could not reuse the single-index
`index_out_of_bounds` helper.

Like the accessors fixed in #3716, its inline interpolated
`abort("... index is (\{i}, \{j})")` builds a `StringBuilder` and inflates the
body past clang's inline-cost threshold (cost=995 vs 225). The backend emits it
as an out-of-line call, so loops that call `swap` cannot inline it.

Add a two-index `index_out_of_bounds2` cold helper (`#inline(never)`) and route
`Array::swap` through it. The body drops to cost ~70 and clang inlines `swap`
into its callers; the exact diagnostic message is preserved.

Validation:
- moon check --target native (clean)
- moon test --target native -p builtin (2835 passed)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

2 of 2 new or added lines in 2 files covered. (100.0%)

15167 of 16672 relevant lines covered (90.97%)

189010.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4782.1 27 Jun 2026 03:17AM UTC 382
90.99
GitHub Action Run
Source Files on build 4782
  • Tree
  • List 381
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 4c41301b on github
  • Prev Build on main (#4780)
  • Next Build on main (#4785)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc