• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

KarpelesLab / goro
13%

Build:
DEFAULT BRANCH: master
Repo Added 14 Mar 2026 02:46AM UTC
Token ejLwcrnknMVLsW2iasnts5p9hKDwCVCMv regen
Build 209 Last
Files 398
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • master

26 May 2026 05:53AM UTC coverage: 12.549% (+0.02%) from 12.53%
26434971110

push

github

MagicalTux
vm: fix array-compound regressions via OP_ARRAY_PRE_CHECK_LOCAL

Commit ab634827 introduced OP_ARRAY_COMPOUND_ASSIGN_LOCAL and
OP_ARRAY_INC_DEC_LOCAL but missed three AST corner cases:

 * assign_dim_op_undef — `$a[$b] += 1` on undefined $a should warn
   "Undefined variable $a" + "Deprecated null offset" + "Undefined
   array key", in that order. The native opcode evaluated the offset
   first and let arrayGet's "Trying to access array offset on null"
   replace the proper undefined-variable warning.

 * bug53432 — `$str[0] += 1` on a string should throw "Cannot use
   assign-op operators with string offsets" BEFORE the offset is
   evaluated. The native path was running arrayGet + arraySetLocal
   through the string-offset machinery instead.

 * bug70662 — when arrayGet's undefined-key warning triggers an error
   handler that creates the key, the compound write must be suppressed
   so the handler's value remains visible.

Adds OP_ARRAY_PRE_CHECK_LOCAL which runs BEFORE the offset is pushed.
It mirrors runArrayAccess.Run's ZtNull / ZtString compound-write-context
branches: warn + auto-vivify undefined containers, vivify explicit
nulls, and throw "Cannot use assign-op operators with string offsets"
for string containers. Warning order now matches the AST.

OP_ARRAY_COMPOUND_ASSIGN_LOCAL and OP_ARRAY_INC_DEC_LOCAL now also:
 * emit "Using null as an array offset is deprecated" in the read
   phase when the offset is null and the container is array/string/
   object (matches compile-array.go:712-717).
 * snapshot key existence pre-arrayGet and re-check the slot post-op.
   If the slot was replaced by a scalar (handler trashed it) or the
   key now exists when it didn't before (handler created it), the
   write is skipped (compile-array.go:826-862, bug70662 semantics).

Verified bit-identical to AST on assign_dim_op_undef, bug53432,
bug70662, plus the existing compound/incdec smoke tests.

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

38 of 119 new or added lines in 2 files covered. (31.93%)

15002 of 119547 relevant lines covered (12.55%)

2557.39 hits per line

Relevant lines Covered
Build:
Build:
119547 RELEVANT LINES 15002 COVERED LINES
2557.39 HITS PER LINE
Source Files on master
  • Tree
  • List 398
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
26434971110 master vm: fix array-compound regressions via OP_ARRAY_PRE_CHECK_LOCAL Commit ab634827 introduced OP_ARRAY_COMPOUND_ASSIGN_LOCAL and OP_ARRAY_INC_DEC_LOCAL but missed three AST corner cases: * assign_dim_op_undef — `$a[$b] += 1` on undefined $a should... push 26 May 2026 05:54AM UTC MagicalTux github
12.55
26434484640 master compiler: relax IsSlotSafe gates for natively-emitted writes Object-prop / static-prop / dyn-name compound assigns and inc/dec, plus $local[k] OP=/++, all now emit natively (no AST.Run delegation). The dispatch handlers don't touch caller locals,... push 26 May 2026 05:40AM UTC MagicalTux github
12.53
26434357893 master vm: lower $arr[k] OP= rhs and $arr[k]++ on simple-local arr natively Add OP_ARRAY_COMPOUND_ASSIGN_LOCAL and OP_ARRAY_INC_DEC_LOCAL, extending the existing OP_ARRAY_SET_LOCAL fast path to compound assigns and inc/dec on simple-local array containe... push 26 May 2026 05:36AM UTC MagicalTux github
12.53
26394336499 master vm: lower $b = &$a ref-assign for simple-local LHS natively Adds OP_STORE_LOCAL_REF, writing a ref-typed ZVal into a local slot without the COW-Dup that OP_STORE_LOCAL applies to ZtArray values (frame.go:160-166 follows ref→Nude+Dup, which detach... push 25 May 2026 09:50AM UTC MagicalTux github
12.54
26393926214 master vm: lower $obj->$x OP=/++ dyn-name property compound/incdec natively Adds OP_OBJECT_DYN_COMPOUND_ASSIGN and OP_INC_DEC_OBJ_DYN_PROP. Both pop the receiver and name from the stack rather than the const pool, reusing the existing objectGet/objectSe... push 25 May 2026 09:39AM UTC MagicalTux github
12.52
26392427217 master vm: lower $obj->$x = v / $obj->{$x} = v to OP_OBJECT_DYN_SET Adds OP_OBJECT_DYN_SET handling the dynamic-name property write shape that was previously generic-AST-delegated via OpClassConst. Stack: [receiver, name, value] → optionally push value... push 25 May 2026 08:59AM UTC MagicalTux github
12.55
26391790448 master vm: lower isset/empty on static prop + fix bug44660 inc/dec error verb Two related changes: 1) Lower isset(Foo::\$bar) / empty(Foo::\$bar) natively. New helpers in compile-isset.go: EvalIssetStaticProp — mirrors checkExistence's *runCla... push 25 May 2026 08:44AM UTC MagicalTux github
12.55
26391575478 master vm: lower \$obj->n++/--, Foo::\$x++/-- inc/dec to OP_INC_DEC_OBJ/STATIC_PROP Inc/dec on object and static properties were delegated to the AST runner via emitAssignViaAST. They now lower to two dedicated opcodes mirroring the OBJECT_COMPOUND_ASSI... push 25 May 2026 08:39AM UTC MagicalTux github
12.56
26391453745 master vm: lower Foo::\$bar OP= rhs to OP_STATIC_PROP_COMPOUND_ASSIGN Mirrors the OP_OBJECT_COMPOUND_ASSIGN landed in the prior commit. Encoding: A = const-pool name index (ZString varName, w/o leading $) B = tokenizer ItemType (op token) C bit 0... push 25 May 2026 08:36AM UTC MagicalTux github
12.53
26391351891 master vm: lower \$obj->prop OP= rhs to OP_OBJECT_COMPOUND_ASSIGN Compound assigns on object properties (e.g. $obj->n += 5, $obj->s .= ' x') were delegated to the AST runner via emitAssignViaAST. They now lower to a dedicated OP_OBJECT_COMPOUND_ASSIGN o... push 25 May 2026 08:33AM UTC MagicalTux github
12.51
See All Builds (209)

Badge your Repo: goro

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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