Skip to content

Omit error checking at OP_RETURN, OP_RETURN_BLK and OP_BREAK - #6312

Merged
matz merged 1 commit into
mruby:masterfrom
dearblue:OP_RETURN
Jul 30, 2024
Merged

Omit error checking at OP_RETURN, OP_RETURN_BLK and OP_BREAK#6312
matz merged 1 commit into
mruby:masterfrom
dearblue:OP_RETURN

Conversation

@dearblue

Copy link
Copy Markdown
Contributor

Clearing errors at the beginning of mrb_vm_exec() essentially keeps the mruby VM in a non-error state.

For consistency, functions such as mrb_funcall() check for errors when control returns from a C function as a method. In the case of a tail call, it should return to mrb_vm_exec() afterwards, so error checking is performed there.

Instructions issued while mrb->exc is non-null should be limited to OP_EXCEPT, the jump target of the catch handler table.

Clearing errors at the beginning of `mrb_vm_exec()` essentially keeps the mruby VM in a non-error state.

For consistency, functions such as `mrb_funcall()` check for errors when control returns from a C function as a method.
In the case of a tail call, it should return to `mrb_vm_exec()` afterwards, so error checking is performed there.

Instructions issued while `mrb->exc` is non-null should be limited to `OP_EXCEPT`, the jump target of the catch handler table.
@dearblue
dearblue requested a review from matz as a code owner July 21, 2024 13:26
@github-actions github-actions Bot added the core label Jul 21, 2024
@matz
matz merged commit eca59ad into mruby:master Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants