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

KarpelesLab / goro / 25336161853
13%

Build:
DEFAULT BRANCH: master
Ran 04 May 2026 06:32PM UTC
Jobs 1
Files 394
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 06:30PM UTC coverage: 6.72% (+0.008%) from 6.712%
25336161853

push

github

MagicalTux
vm: cache locals in a slot array (skip hashtable on reads)

Frame.locals is a fixed-size []*phpv.ZVal indexed by
Function.Locals position. At frame init the slots are
populated from the FuncContext hashtable via OffsetCheck
(distinguishing "exists" from "missing" — OffsetGet can't,
since ZHashTable.GetString returns a fresh ZNULL on miss).

Reads (OP_LOAD_LOCAL, OP_LOAD_LOCAL_OR_WARN, the inc/dec
helpers, OP_OP_ASSIGN_LOCAL, OP_FOREACH_STEP key/val
binding, OP_ARRAY_*_LOCAL container fetch) all go straight
to the slot — zero hashtable lookups on the hot path.

Writes go through Frame.storeLocal which updates the slot
and the hashtable. The hashtable stays authoritative for
external readers (extract/compact/debug_print_backtrace
arg lists, builtins inspecting the FuncContext, …) so
nothing observable changes.

ZHashTable.SetString dups a cached singleton ZVal before
storing — slot writes follow the same policy via the new
phpv.(*ZVal).IsCached accessor and a NewZVal(v.Value()) dup.
Without this, OP_OP_ASSIGN_LOCAL on a fresh slot ($x=5;
$x++) would later panic in DoInc when SetVal hit the cached
small-int singleton.

Bench impact (vs. AST baseline):
  Arithmetic    ~ -30%  (44M -> 31M ns)
  Fibonacci     ~ -17%  (25M -> 21M ns)
  ArrayOps      ~ -16%  (13M -> 11M ns)
  FunctionCalls ~ -16%  (20M -> 17M ns)
  StringConcat  ~ flat
phpt under GORO_VM=1: still zero new regressions.

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

40 of 57 new or added lines in 4 files covered. (70.18%)

8 existing lines in 3 files now uncovered.

7662 of 114020 relevant lines covered (6.72%)

802.57 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
60.25
0.2% core/vm/vm.go
3
79.31
-4.9% core/vm/frame.go
2
25.42
2.35% core/vm/ops_array.go

Coverage Regressions

Lines Coverage ∆ File
5
29.25
-4.72% core/phpctx/global-array.go
2
25.42
2.35% core/vm/ops_array.go
1
60.25
0.2% core/vm/vm.go
Jobs
ID Job ID Ran Files Coverage
1 25336161853.1 04 May 2026 06:32PM UTC 394
6.72
GitHub Action Run
Source Files on build 25336161853
  • Tree
  • List 394
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25336161853
  • 01b6e966 on github
  • Prev Build on master (#25325471162)
  • Next Build on master (#25336630631)
  • 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