summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2022-03-02 09:27:30 +0900
committerGitHub <noreply@github.com>2022-03-02 09:27:30 +0900
commitf7491e89b9daacbdbfb716d585e9c325ab6d3f45 (patch)
tree7e6f35416449efeca334b2f12bb68054ddfaf943 /compile.c
parent128972189284f4338722e8a910d0b4f6e7a02b31 (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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 9c96ce7f8e..cd3f0e2a9d 100644
--- a/compile.c
+++ b/compile.c
@@ -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));