diff options
author | S.H <gamelinks007@gmail.com> | 2022-03-02 09:27:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 09:27:30 +0900 |
commit | f7491e89b9daacbdbfb716d585e9c325ab6d3f45 (patch) | |
tree | 7e6f35416449efeca334b2f12bb68054ddfaf943 /compile.c | |
parent | 128972189284f4338722e8a910d0b4f6e7a02b31 (diff) |
Using macros to check iseq element
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5558
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2093,7 +2093,7 @@ fix_sp_depth(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) LINK_ELEMENT *list; for (list = FIRST_ELEMENT(anchor); list; list = list->next) { - if (list->type == ISEQ_ELEMENT_LABEL) { + if (IS_LABEL(list)) { LABEL *lobj = (LABEL *)list; lobj->set = TRUE; } @@ -5629,7 +5629,7 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn, if (LIST_INSN_SIZE_ONE(arg_block)) { LINK_ELEMENT *elem = FIRST_ELEMENT(arg_block); - if (elem->type == ISEQ_ELEMENT_INSN) { + if (IS_INSN(elem)) { INSN *iobj = (INSN *)elem; if (iobj->insn_id == BIN(getblockparam)) { iobj->insn_id = BIN(getblockparamproxy); @@ -7867,7 +7867,7 @@ delegate_call_p(const rb_iseq_t *iseq, unsigned int argc, const LINK_ANCHOR *arg const LINK_ELEMENT *elem = FIRST_ELEMENT(args); for (unsigned int i=start; i-start<argc; i++) { - if (elem->type == ISEQ_ELEMENT_INSN && + if (IS_INSN(elem) && INSN_OF(elem) == BIN(getlocal)) { int local_index = FIX2INT(OPERAND_AT(elem, 0)); int local_level = FIX2INT(OPERAND_AT(elem, 1)); |