summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-05-15 18:05:12 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:20:53 +0900
commit68f8d73308fce7acca3605858fa2755185844b76 (patch)
tree7417b1fd5f4c4e13a1288646b55fb123585e4de1
parent246c76e261ee033210527cfcd37c8eb4bfe680c7 (diff)
downloadmruby-68f8d73308fce7acca3605858fa2755185844b76.tar.gz
mruby-68f8d73308fce7acca3605858fa2755185844b76.zip
Use `MRB_QSYM()` instead of `MRB_OPSYM()`.
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c8
-rw-r--r--mrbgems/mruby-compiler/core/parse.y74
-rw-r--r--src/array.c2
-rw-r--r--src/proc.c2
-rw-r--r--src/vm.c10
5 files changed, 48 insertions, 48 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index eae1895a6..980906e38 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -1742,7 +1742,7 @@ codegen(codegen_scope *s, node *tree, int val)
genop_3(s, OP_SEND, cursp(), new_sym(s, MRB_SYM(__case_eqq)), 1);
}
else {
- genop_3(s, OP_SEND, cursp(), new_sym(s, MRB_OPSYM(eqq)), 1);
+ genop_3(s, OP_SEND, cursp(), new_sym(s, MRB_QSYM(eqq)), 1);
}
}
else {
@@ -2545,7 +2545,7 @@ codegen(codegen_scope *s, node *tree, int val)
default:
if (val) {
- int sym = new_sym(s, MRB_OPSYM(minus));
+ int sym = new_sym(s, MRB_QSYM(minus));
codegen(s, tree, VAL);
pop();
genop_3(s, OP_SEND, cursp(), sym, 0);
@@ -2637,7 +2637,7 @@ codegen(codegen_scope *s, node *tree, int val)
}
push(); /* for block */
pop_n(3);
- sym = new_sym(s, MRB_OPSYM(tick)); /* ` */
+ sym = new_sym(s, MRB_QSYM(tick)); /* ` */
genop_3(s, OP_SEND, cursp(), sym, 1);
if (val) push();
mrb_gc_arena_restore(s->mrb, ai);
@@ -2657,7 +2657,7 @@ codegen(codegen_scope *s, node *tree, int val)
genop_2(s, OP_STRING, cursp(), off);
push(); push();
pop_n(3);
- sym = new_sym(s, MRB_OPSYM(tick)); /* ` */
+ sym = new_sym(s, MRB_QSYM(tick)); /* ` */
genop_3(s, OP_SEND, cursp(), sym, 1);
if (val) push();
mrb_gc_arena_restore(s->mrb, ai);
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 806032e22..e0adbfc4b 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -311,14 +311,14 @@ static void
local_add_blk(parser_state *p, mrb_sym blk)
{
/* allocate register for block */
- local_add_f(p, blk ? blk : MRB_OPSYM(and));
+ local_add_f(p, blk ? blk : MRB_QSYM(and));
}
static void
local_add_kw(parser_state *p, mrb_sym kwd)
{
/* allocate register for keywords hash */
- local_add_f(p, kwd ? kwd : MRB_OPSYM(pow));
+ local_add_f(p, kwd ? kwd : MRB_QSYM(pow));
}
static node*
@@ -1671,7 +1671,7 @@ command_asgn : lhs '=' command_rhs
}
| primary_value '[' opt_call_args ']' tOP_ASGN command_rhs
{
- $$ = new_op_asgn(p, new_call(p, $1, MRB_OPSYM(aref), $3, '.'), $5, $6);
+ $$ = new_op_asgn(p, new_call(p, $1, MRB_QSYM(aref), $3, '.'), $5, $6);
}
| primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
{
@@ -1902,7 +1902,7 @@ mlhs_node : variable
}
| primary_value '[' opt_call_args ']'
{
- $$ = new_call(p, $1, MRB_OPSYM(aref), $3, '.');
+ $$ = new_call(p, $1, MRB_QSYM(aref), $3, '.');
}
| primary_value call_op tIDENTIFIER
{
@@ -1941,7 +1941,7 @@ lhs : variable
}
| primary_value '[' opt_call_args ']'
{
- $$ = new_call(p, $1, MRB_OPSYM(aref), $3, '.');
+ $$ = new_call(p, $1, MRB_QSYM(aref), $3, '.');
}
| primary_value call_op tIDENTIFIER
{
@@ -2029,36 +2029,36 @@ undef_list : fsym
}
;
-op : '|' { $$ = MRB_OPSYM(or); }
- | '^' { $$ = MRB_OPSYM(xor); }
- | '&' { $$ = MRB_OPSYM(and); }
- | tCMP { $$ = MRB_OPSYM(cmp); }
- | tEQ { $$ = MRB_OPSYM(eq); }
- | tEQQ { $$ = MRB_OPSYM(eqq); }
- | tMATCH { $$ = MRB_OPSYM(match); }
- | tNMATCH { $$ = MRB_OPSYM(nmatch); }
- | '>' { $$ = MRB_OPSYM(gt); }
- | tGEQ { $$ = MRB_OPSYM(ge); }
- | '<' { $$ = MRB_OPSYM(lt); }
- | tLEQ { $$ = MRB_OPSYM(le); }
- | tNEQ { $$ = MRB_OPSYM(neq); }
- | tLSHFT { $$ = MRB_OPSYM(lshift); }
- | tRSHFT { $$ = MRB_OPSYM(rshift); }
- | '+' { $$ = MRB_OPSYM(add); }
- | '-' { $$ = MRB_OPSYM(sub); }
- | '*' { $$ = MRB_OPSYM(mul); }
- | tSTAR { $$ = MRB_OPSYM(mul); }
- | '/' { $$ = MRB_OPSYM(div); }
- | '%' { $$ = MRB_OPSYM(mod); }
- | tPOW { $$ = MRB_OPSYM(pow); }
- | tDSTAR { $$ = MRB_OPSYM(pow); }
- | '!' { $$ = MRB_OPSYM(not); }
- | '~' { $$ = MRB_OPSYM(neg); }
- | tUPLUS { $$ = MRB_OPSYM(plus); }
- | tUMINUS { $$ = MRB_OPSYM(minus); }
- | tAREF { $$ = MRB_OPSYM(aref); }
- | tASET { $$ = MRB_OPSYM(aset); }
- | '`' { $$ = MRB_OPSYM(tick); }
+op : '|' { $$ = MRB_QSYM(or); }
+ | '^' { $$ = MRB_QSYM(xor); }
+ | '&' { $$ = MRB_QSYM(and); }
+ | tCMP { $$ = MRB_QSYM(cmp); }
+ | tEQ { $$ = MRB_QSYM(eq); }
+ | tEQQ { $$ = MRB_QSYM(eqq); }
+ | tMATCH { $$ = MRB_QSYM(match); }
+ | tNMATCH { $$ = MRB_QSYM(nmatch); }
+ | '>' { $$ = MRB_QSYM(gt); }
+ | tGEQ { $$ = MRB_QSYM(ge); }
+ | '<' { $$ = MRB_QSYM(lt); }
+ | tLEQ { $$ = MRB_QSYM(le); }
+ | tNEQ { $$ = MRB_QSYM(neq); }
+ | tLSHFT { $$ = MRB_QSYM(lshift); }
+ | tRSHFT { $$ = MRB_QSYM(rshift); }
+ | '+' { $$ = MRB_QSYM(add); }
+ | '-' { $$ = MRB_QSYM(sub); }
+ | '*' { $$ = MRB_QSYM(mul); }
+ | tSTAR { $$ = MRB_QSYM(mul); }
+ | '/' { $$ = MRB_QSYM(div); }
+ | '%' { $$ = MRB_QSYM(mod); }
+ | tPOW { $$ = MRB_QSYM(pow); }
+ | tDSTAR { $$ = MRB_QSYM(pow); }
+ | '!' { $$ = MRB_QSYM(not); }
+ | '~' { $$ = MRB_QSYM(neg); }
+ | tUPLUS { $$ = MRB_QSYM(plus); }
+ | tUMINUS { $$ = MRB_QSYM(minus); }
+ | tAREF { $$ = MRB_QSYM(aref); }
+ | tASET { $$ = MRB_QSYM(aset); }
+ | '`' { $$ = MRB_QSYM(tick); }
;
reswords : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__
@@ -2288,8 +2288,8 @@ paren_args : '(' opt_call_args ')'
| '(' tDOT3 rparen
{
#if 1
- mrb_sym r = MRB_OPSYM(mul);
- mrb_sym b = MRB_OPSYM(and);
+ mrb_sym r = MRB_QSYM(mul);
+ mrb_sym b = MRB_QSYM(and);
if (local_var_p(p, r) && local_var_p(p, b)) {
$$ = cons(list1(new_splat(p, new_lvar(p, r))),
new_block_arg(p, new_lvar(p, b)));
diff --git a/src/array.c b/src/array.c
index 02d792657..5a4639da7 100644
--- a/src/array.c
+++ b/src/array.c
@@ -1314,7 +1314,7 @@ init_ary_each(mrb_state *mrb, struct RClass *ary)
each_irep->syms = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym)*5);
each_irep->syms[0] = MRB_SYM(each);
each_irep->syms[1] = MRB_SYM(to_enum);
- each_irep->syms[2] = MRB_OPSYM(aref);
+ each_irep->syms[2] = MRB_QSYM(aref);
each_irep->syms[3] = MRB_SYM(call);
each_irep->syms[4] = MRB_SYM(length);
each_irep->slen = 5;
diff --git a/src/proc.c b/src/proc.c
index bb678558d..36e7a5652 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -326,7 +326,7 @@ mrb_init_proc(mrb_state *mrb)
irep_obj->data = NULL;
MRB_METHOD_FROM_PROC(m, p);
mrb_define_method_raw(mrb, mrb->proc_class, MRB_SYM(call), m);
- mrb_define_method_raw(mrb, mrb->proc_class, MRB_OPSYM(aref), m);
+ mrb_define_method_raw(mrb, mrb->proc_class, MRB_QSYM(aref), m);
mrb_define_class_method(mrb, mrb->kernel_module, "lambda", proc_lambda, MRB_ARGS_NONE()|MRB_ARGS_BLOCK()); /* 15.3.1.2.6 */
mrb_define_method(mrb, mrb->kernel_module, "lambda", proc_lambda, MRB_ARGS_NONE()|MRB_ARGS_BLOCK()); /* 15.3.1.3.27 */
diff --git a/src/vm.c b/src/vm.c
index 5c305908e..2e96cd0dc 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2142,7 +2142,7 @@ RETRY_TRY_BLOCK:
OP_MATH_CASE_STRING_##op_name(); \
default: \
c = 1; \
- mid = MRB_OPSYM(op_name); \
+ mid = MRB_QSYM(op_name); \
goto L_SEND_SYM; \
} \
NEXT;
@@ -2229,7 +2229,7 @@ RETRY_TRY_BLOCK:
#endif
default:
c = 1;
- mid = MRB_OPSYM(div);
+ mid = MRB_QSYM(div);
goto L_SEND_SYM;
}
@@ -2255,7 +2255,7 @@ RETRY_TRY_BLOCK:
default: \
SET_INT_VALUE(regs[a+1], b); \
c = 1; \
- mid = MRB_OPSYM(op_name); \
+ mid = MRB_QSYM(op_name); \
goto L_SEND_SYM; \
} \
NEXT;
@@ -2301,7 +2301,7 @@ RETRY_TRY_BLOCK:
break;\
default:\
c = 1;\
- mid = MRB_OPSYM(sym);\
+ mid = MRB_QSYM(sym);\
goto L_SEND_SYM;\
}\
if (result) {\
@@ -2330,7 +2330,7 @@ RETRY_TRY_BLOCK:
break;\
default:\
c = 1;\
- mid = MRB_OPSYM(sym);\
+ mid = MRB_QSYM(sym);\
goto L_SEND_SYM;\
}\
if (result) {\