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

KarpelesLab / goro / 25324667258
13%

Build:
DEFAULT BRANCH: master
Ran 04 May 2026 02:27PM UTC
Jobs 1
Files 393
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 02:26PM UTC coverage: 6.343% (+0.5%) from 5.849%
25324667258

push

github

MagicalTux
vm: native array literals, index read, index/append write

Adds OP_NEW_ARRAY, OP_ARRAY_INIT_APPEND, OP_ARRAY_INIT_KEYED,
OP_ARRAY_GET, OP_ARRAY_SET_LOCAL, OP_ARRAY_APPEND_LOCAL.

Coverage:
- Empty + populated array literals: [], [1,2,3], [k=>v, ...]
- Indexed read: $a[$k] — dispatches at runtime on container
  type (array, object via ArrayAccess, string via ZStringArray,
  null/false → null+warn, scalar → "Cannot use scalar as array")
- Indexed write to local: $local[$k] = $v — handles auto-viv
  from null and (PHP-deprecated) from false, ArrayAccess
  on objects, full string-offset semantics (illegal-offset
  warnings, single-byte truncation, etc.).
- Append to local: $local[] = $v — same auto-viv chain;
  fatal-error on string container ([] not supported).

Spread entries (...$expr), nullsafe access ($obj?->arr[$k]),
non-local LHS containers ($a->p[0] = ..., $arr[0][1] = ...)
fall back to AST via ErrUnsupported.

The runtime helper arraySetLocal in core/vm/ops_array.go
mirrors runArrayAccess.WriteValue's container-type dispatch
so behaviour matches the AST for every supported case.

phpt suite under GORO_VM=1: still zero regressions.
ArrayOps bench: AST and VM now at parity (foreach in the
loop body still falls back; expect a perf win once foreach
lands).

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

129 of 265 new or added lines in 5 files covered. (48.68%)

7219 of 113808 relevant lines covered (6.34%)

731.77 hits per line

Uncovered Changes

Lines Coverage ∆ File
90
23.08
core/vm/ops_array.go
29
60.81
core/vm/vmcompiler/emit_array.go
12
57.64
1.33% core/vm/vm.go
3
81.94
0.92% core/vm/vmcompiler/emit_expr.go
2
71.01
3.74% core/compiler/vmaccess.go
Jobs
ID Job ID Ran Files Coverage
1 25324667258.1 04 May 2026 02:27PM UTC 393
6.34
GitHub Action Run
Source Files on build 25324667258
  • Tree
  • List 393
  • Changed 19
  • Source Changed 4
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25324667258
  • 135846e0 on github
  • Prev Build on master (#25324078757)
  • Next Build on master (#25325471162)
  • 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