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

KarpelesLab / goro / 26081419167

19 May 2026 06:54AM UTC coverage: 12.31% (-31.6%) from 43.914%
26081419167

push

github

MagicalTux
vm: lower isset/empty array-access natively (\$container[\$key])

Adds OP_ISSET_DIM / OP_EMPTY_DIM. The per-arg dispatch in
emit_expr.go now handles two native shapes:
 - simple variable (\$x) — still OP_ISSET_LOCAL / OP_EMPTY_LOCAL
 - array access (\$x[\$k], also nested \$x[\$k1][\$k2]) — emit the
   container + offset, then the dim opcode

OP_ISSET_DIM calls compiler.EvalIssetDim — extracted from the AST's
checkExistence runArrayAccess branch, covering null-key deprecation,
array/object-key TypeErrors, string-offset coercion, ArrayAccess
FindIssetDimHandler dispatch, and the regular array exists+not-null
check.

OP_EMPTY_DIM calls compiler.EvalEmptyDim with the same shape for the
empty() variant.

Bodies whose only isset/empty usage is supported shapes (simple var
or array-access nesting on simple vars) stay slot-safe.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

88 of 274 new or added lines in 5 files covered. (32.12%)

37030 existing lines in 335 files now uncovered.

14439 of 117292 relevant lines covered (12.31%)

2557.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

21.62
/core/phpobj/exception.go


Source Not Available

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