diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-23 12:11:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-23 12:11:57 +0000 |
commit | cffb09aa80e185eb92f2ecaa19a7b51d2a5267db (patch) | |
tree | 001a6c4cf829114d0538bc4069f362e272bfe249 /compile.c | |
parent | dfc11063da2cd8a09a9ee3648c3ad132f90f1a2b (diff) |
LABEL_FORMAT
* compile.c (LABEL_FORMAT): extract format string for labels.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -173,6 +173,7 @@ struct iseq_compile_data_ensure_node_stack { /* create new label */ #define NEW_LABEL(l) new_label_body(iseq, (l)) +#define LABEL_FORMAT "<L%03d>" #define iseq_path(iseq) ((iseq)->body->location.path) #define iseq_absolute_path(iseq) ((iseq)->body->location.absolute_path) @@ -6444,7 +6445,7 @@ insn_data_to_s_detail(INSN *iobj) case TS_OFFSET: /* label(destination position) */ { LABEL *lobj = (LABEL *)OPERAND_AT(iobj, j); - rb_str_catf(str, "<L%03d>", lobj->label_no); + rb_str_catf(str, LABEL_FORMAT, lobj->label_no); break; } break; @@ -6550,7 +6551,7 @@ dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr) case ISEQ_ELEMENT_LABEL: { lobj = (LABEL *)link; - printf("<L%03d>\n", lobj->label_no); + printf(LABEL_FORMAT"\n", lobj->label_no); break; } case ISEQ_ELEMENT_NONE: |