Skip to content

Fix eval control-flow and semantics#159

Merged
fglock merged 10 commits intomasterfrom
fix-eval-controlflow
Feb 4, 2026
Merged

Fix eval control-flow and semantics#159
fglock merged 10 commits intomasterfrom
fix-eval-controlflow

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Feb 3, 2026

Fix eval BLOCK and eval STRING semantics:

  • Prevent early termination: treat marked non-TAILCALL control-flow markers escaping eval BLOCK as eval errors ( + undef/empty list) rather than propagating markers.
  • Ensure eval STRING runtime errors propagate to RuntimeCode.applyEval() so is set (and cleared only on success).
  • Fix eval STRING compilation errors to be caught and reported via .

Build/tests:

  • make (includes unit test shards) passes.

fglock added 10 commits February 3, 2026 11:03
- Move storeSourceLines to finally block to run on both success and failure paths
- Extend storeSourceLines to handle #line directives populating @{'_<filename'} arrays
- Initialize ast to null to satisfy definite assignment
- Improves comp/retainedlines.t from 53/109 to 92/109 passing tests
- Add PerlDieException to carry original die payload (references, embedded NULs) through eval.
- Ensure die() always throws (even with {__DIE__}) so eval returns undef and sets .
- Prevent double invocation of {__DIE__} inside eval for PerlDieException.
- Preserve reference mutation semantics in __DIE__ handlers.
- Restore __DIE__ invocation for eval-string compile errors (tests 22-25 now pass).
@fglock fglock merged commit ed652d6 into master Feb 4, 2026
2 checks passed
@fglock fglock deleted the fix-eval-controlflow branch February 4, 2026 10:50
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