Skip to content

Shrinking the code in OP_BREAK and OP_RETURN_BLK - #6320

Merged
matz merged 1 commit into
mruby:masterfrom
dearblue:OP_BREAK
Aug 14, 2024
Merged

Shrinking the code in OP_BREAK and OP_RETURN_BLK#6320
matz merged 1 commit into
mruby:masterfrom
dearblue:OP_BREAK

Conversation

@dearblue

Copy link
Copy Markdown
Contributor
  • Can refer directly to proc->e.env after MRB_PROC_ENV_P().
  • Can omit MRB_ENV_ONSTACK_P() since mrb->c is never NULL and can be directly compared to env->cxt.
  • Can avoid goto by putting the code block that raises the LocalJumpError at the end.

  - Can refer directly to `proc->e.env` after `MRB_PROC_ENV_P()`.
  - Can omit `MRB_ENV_ONSTACK_P()` since `mrb->c` is never NULL and can be directly compared to `env->cxt`.
  - Can avoid `goto` by putting the code block that raises the `LocalJumpError` at the end.
@dearblue
dearblue requested a review from matz as a code owner August 12, 2024 12:13
@github-actions github-actions Bot added the core label Aug 12, 2024
@matz
matz merged commit 16f5000 into mruby:master Aug 14, 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