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

KarpelesLab / goro / 25323398578
13%

Build:
DEFAULT BRANCH: master
Ran 04 May 2026 02:02PM UTC
Jobs 1
Files 390
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:00PM UTC coverage: 5.813% (+0.01%) from 5.803%
25323398578

push

github

MagicalTux
vm: GORO_VM gate, regression-free under phpt suite, diff tests

Wires the VM into the full compile pipeline behind the
GORO_VM env var, hardens the integration so the existing
phpt suite produces the same pass/fail set with the VM on
or off, and adds a focused differential test runner.

Compatibility fixes (these were the 9 phpt regressions
flagged by an initial GORO_VM=1 run; all now pass):

- core/compiler/compile.go: GetChildren unwraps any VM
  Runnable that exposes Inner() so AST walks (yield
  collection, validate-break, attribute introspection)
  see the original tree.
- core/compiler/closure.go: ZClosure.Dump unwraps VM bodies
  before checking for *runArrowReturn / phpv.Runnables so
  the AST printer keeps producing correct source.
- core/compiler/compile-func.go: skip VM compile when the
  function declares a by-ref return (`&function (…)`) — the
  AST emits a "Only variable references should be returned
  by reference" notice the emitter doesn't replicate.
- core/vm/vm.go: pass logopt.NoFuncName(true) on the
  "Undefined variable" warning so error_reporting tests
  that check the prefix-less form pass.
- core/vm/ops_arith.go: opNeg replicates runOperator's
  dedicated unary-minus path — direct negation for int /
  float (preserves -0.0), GMP HandleDoOperation, fall-back
  to OperatorMath for string/bool/null. Fixes a panic on
  `-INF` (was a ZFloat being typed as ZInt).
- core/vm/runner.go: vm.Runnable exposes Inner() too.
- core/vm/vmcompiler/compile.go: Compile auto-unwraps any
  pre-existing VM wrapper at entry.

Tests:
- New vm_diff_test.go at repo root (TestVMDiff) runs 20
  hand-curated PHP snippets under both backends and asserts
  byte-identical stdout. Covers arithmetic, control flow,
  function calls, recursion, undefined-var warnings, and
  the array/foreach fall-back path.
- bench_test.go now uses b.Run("ast", …) / b.Run("vm", …)
  so each benchmark runs both backends.

Verification: with master @ 5247fee4, both `go test ./...`
... (continued)

20 of 52 new or added lines in 8 files covered. (38.46%)

4 existing lines in 2 files now uncovered.

6595 of 113458 relevant lines covered (5.81%)

652.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
65.93
-8.39% core/vm/ops_arith.go
9
4.52
-0.01% core/compiler/closure.go
8
67.27
-11.45% core/compiler/vmaccess.go
2
72.73
-2.27% core/vm/vmcompiler/compile.go
1
0.0
0.0% core/vm/runner.go
1
56.31
0.0% core/vm/vm.go

Coverage Regressions

Lines Coverage ∆ File
3
47.37
0.03% core/compiler/compile.go
1
65.93
-8.39% core/vm/ops_arith.go
Jobs
ID Job ID Ran Files Coverage
1 25323398578.1 04 May 2026 02:02PM UTC 390
5.81
GitHub Action Run
Source Files on build 25323398578
  • Tree
  • List 390
  • Changed 9
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25323398578
  • a9e2f6c5 on github
  • Prev Build on master (#25322649549)
  • Next Build on master (#25324078757)
  • 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