Skip to content

fix(regex): publish MARK state to exact packages - #1051

Draft
fglock wants to merge 3 commits into
integration/phase36-regex-parityfrom
wip/phase36-mark-package-owner-20260818-145245
Draft

fix(regex): publish MARK state to exact packages#1051
fglock wants to merge 3 commits into
integration/phase36-regex-parityfrom
wip/phase36-mark-package-owner-20260818-145245

Conversation

@fglock

@fglock fglock commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add native Joni support for Perl's (*:NAME) MARK shorthand
  • publish $REGMARK and $REGERROR to the exact executing package
  • carry the interpreter match operator's lexical package on match bytecodes
  • preserve callback lexical-package publication and nested-match restoration
  • refresh list-form our aliases when a later declaration changes package
  • replace broad localized-global broadcasting with exact package ownership

Validation

  • standard Perl expanded oracle: 53/53
  • PerlOnJava JVM: 53/53
  • PerlOnJava interpreter: 53/53
  • direct Joni suite: passed
  • warning-free make: passed in 2m54s after the final alias correction
  • compatibility portion: first 31/31 assertions remain green
  • unrelated localized package globals remain unchanged

Stack

This draft is based on the pre-fallback PR #1042 checkpoint and will be rebased
onto the final strict-parity PR #1042 head before review. The first commit is an
intentional recovery snapshot created under the dirty-tree safety protocol;
history can be polished after the integration base stabilizes.

Generated with Codex

fglock and others added 3 commits August 18, 2026 14:53
Preserve the JVM-complete MARK shorthand and exact-package publication delta
before changing the interpreter match-package mechanism. Standard Perl and JVM
pass 53/53; the interpreter currently passes 45/53.

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

Co-Authored-By: Codex <codex@openai.com>
Encode the lexical package on MATCH_REGEX and MATCH_REGEX_NOT bytecodes and
scope InterpreterState.currentPackage around runtime matching. This gives MARK
and REGERROR an exact executing-package owner while preserving callback lexical
package overrides and nested-match restoration.

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

Co-Authored-By: Codex <codex@openai.com>
Apply the existing cross-package our-alias refresh to list declarations as
well as scalar declarations. Later bare reads now resolve to the package of
the most recent lexical our declaration instead of the preceding package.

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

Co-Authored-By: Codex <codex@openai.com>
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