diff options
author | yui-knk <[email protected]> | 2023-05-22 21:55:49 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2023-05-23 18:05:35 +0900 |
commit | 98637d421dbe8bcf86cc2effae5e26bb96a6a4da (patch) | |
tree | 991149893428e3b074774caba9533bb221e5ca42 /compile.c | |
parent | ef3aa22738d934beedfda9f486f3384e5457da8b (diff) |
Move `ruby_node_name` to node.c and rename prefix of the function
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7844
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -404,7 +404,7 @@ do { \ if (error_type != (ndtype)) { \ COMPILE_ERROR(ERROR_ARGS_AT(error_node) \ prefix ": " #ndtype " is expected, but %s", \ - ruby_node_name(error_type)); \ + rb_node_name(error_type)); \ return errval; \ } \ } while (0) @@ -420,7 +420,7 @@ do { \ do { \ const NODE *error_node = (node); \ COMPILE_ERROR(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \ - ruby_node_name(nd_type(error_node))); \ + rb_node_name(nd_type(error_node))); \ return errval; \ } while (0) @@ -4302,12 +4302,12 @@ compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *co case NODE_STR: case NODE_ZLIST: case NODE_LAMBDA: - /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */ + /* printf("useless condition eliminate (%s)\n", rb_node_name(nd_type(cond))); */ ADD_INSNL(ret, cond, jump, then_label); return COMPILE_OK; case NODE_FALSE: case NODE_NIL: - /* printf("useless condition eliminate (%s)\n", ruby_node_name(nd_type(cond))); */ + /* printf("useless condition eliminate (%s)\n", rb_node_name(nd_type(cond))); */ ADD_INSNL(ret, cond, jump, else_label); return COMPILE_OK; case NODE_LIST: @@ -8910,7 +8910,7 @@ compile_op_cdecl(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node break; default: COMPILE_ERROR(ERROR_ARGS "%s: invalid node in NODE_OP_CDECL", - ruby_node_name(nd_type(node->nd_head))); + rb_node_name(nd_type(node->nd_head))); return COMPILE_NG; } mid = node->nd_head->nd_mid; |