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

KarpelesLab / goro / 25339931361
13%

Build:
DEFAULT BRANCH: master
Ran 04 May 2026 07:51PM UTC
Jobs 1
Files 398
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

04 May 2026 07:49PM UTC coverage: 8.47% (+0.03%) from 8.438%
25339931361

push

github

MagicalTux
vm: slot-only writes for slot-safe functions (-50% on Arithmetic)

When a function's body is statically determined safe, local
writes skip the FuncContext hashtable mirror entirely. The
slot cache becomes authoritative for locals.

compiler.IsSlotSafe walks the AST to confirm the body has:
- No extract/compact/get_defined_vars/parse_str/mb_parse_str/
  func_get_args/func_num_args/func_get_arg calls (all read or
  write callee locals through the FuncContext hashtable).
- No variable-variable references (\$\$x via runVariableRef).
- No \$GLOBALS reference (reads/writes go through the
  hashtable as the underlying global scope).
- No `global \$x` or `static \$x = …` (both bind locals to
  storage that lives outside the slot array).
- No nested function declaration (those bodies may use
  `global \$x` against the enclosing top-level scope).

vmcompiler.Compile sets fn.SlotOnly based on this check.
Frame.storeLocal, the foreach key/value bind, and the array
auto-vivify writeback all gate their ctx.OffsetSet on
fn.SlotOnly.

The closure-body hook also now skips VM-compilation entirely
for closures with by-ref params or by-ref `use` captures —
those need hashtable propagation through the reference, which
neither the value-passing call protocol nor slot-only writes
preserve.

Bench impact (vs. AST baseline):

  Arithmetic    -50%  (58M -> 29M ns,  alloc/op back to 420k)
  ArrayOps      -29%  (12M -> 8.5M ns,  alloc/op 96k vs 118k)
  Fibonacci     -21%  (26M -> 21M ns)
  StringConcat   -5%  (17M -> 16M ns)
  FunctionCalls  +6%  (the call protocol overhead dominates;
                       slot-only doesn't help non-loop work)

phpt under GORO_VM=1: still 20 known regressions, no new ones.

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

32 of 58 new or added lines in 6 files covered. (55.17%)

4 existing lines in 2 files now uncovered.

9706 of 114592 relevant lines covered (8.47%)

966.14 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
35.78
1.22% core/compiler/dispatch.go
5
7.8
0.18% core/compiler/compile-func.go
3
76.47
-2.84% core/vm/frame.go
3
25.81
0.38% core/vm/ops_array.go

Coverage Regressions

Lines Coverage ∆ File
2
25.81
0.38% core/vm/ops_array.go
2
61.39
-0.32% core/vm/vm.go
Jobs
ID Job ID Ran Files Coverage
1 25339931361.1 04 May 2026 07:51PM UTC 398
8.47
GitHub Action Run
Source Files on build 25339931361
  • Tree
  • List 398
  • Changed 9
  • Source Changed 7
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25339931361
  • dabe08aa on github
  • Prev Build on master (#25339530035)
  • Next Build on master (#25341140909)
  • Delete
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