Skip to content

fix: resolve goto labels by lexical scope - #1389

Merged
fglock merged 4 commits into
masterfrom
wip/goto-core-test-20260915-155304
Sep 15, 2026
Merged

fglock merged 4 commits into
masterfrom
wip/goto-core-test-20260915-155304

Conversation

@fglock

@fglock fglock commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • resolve static goto labels by lexical block, including forward/backward references and repeated labels
  • validate eval-originated loop entry by resolved destination PC and restore the runtime package at a label target
  • add focused scoped-label and package-transition regressions

Validation

  • make — passed
  • make check-links — passed
  • goto_scoped_labels.t — passed on JVM and interpreter
  • goto_label_package.t — passed on JVM and interpreter
  • perl5_t/t/op/goto.t — both modes exit 0; all 80 assertions present in the imported file execute, with only its two existing TODO non-passes

The imported op/goto.t still declares 87 tests but contains/emits 80 assertions, so it prints a plan-mismatch diagnostic despite exiting 0. This PR preserves that imported test unchanged and documents the discrepancy in the handoff.

fglock and others added 4 commits September 15, 2026 15:53
Preserve the in-progress compiler changes before continued debugging.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Bind static goto labels to their containing blocks, preserve first repeated
labels, validate eval destinations by PC range, and restore the package at a
goto label. Add focused regression coverage and document core-test validation.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Resolve duplicate labels by lexical target, reject invalid entries into
foreach and expression blocks, and retain optimized-away label failures.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Keep the generated-constructor origin through both goto label collectors so
internal do-block jumps in class field defaults remain valid.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock marked this pull request as ready for review September 15, 2026 20:05
@fglock
fglock merged commit 1415841 into master Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant