aboutsummaryrefslogtreecommitdiffstats
path: root/mjit_compile.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-05-01 02:35:18 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-05-01 02:35:18 -0700
commite19f4b3ac0d5b21563a8f864741602e9b6889120 (patch)
tree6fda7439e0f03407e2d561611c56a8d26286e7b1 /mjit_compile.c
parent90969edf9bfa7cb87c0818f930bb6b548867a99f (diff)
downloadruby-e19f4b3ac0d5b21563a8f864741602e9b6889120.tar.gz
Fix MJIT compiler warnings in clang
Diffstat (limited to 'mjit_compile.c')
-rw-r--r--mjit_compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mjit_compile.c b/mjit_compile.c
index 9ceca5b306..b64cbb42b7 100644
--- a/mjit_compile.c
+++ b/mjit_compile.c
@@ -233,8 +233,8 @@ compile_inlined_cancel_handler(FILE *f, const struct rb_iseq_constant_body *body
fprintf(f, " rb_mjit_recompile_iseq(original_iseq);\n");
// Swap pc/sp set on cancel with original pc/sp.
- fprintf(f, " const VALUE current_pc = reg_cfp->pc;\n");
- fprintf(f, " const VALUE current_sp = reg_cfp->sp;\n");
+ fprintf(f, " const VALUE *current_pc = reg_cfp->pc;\n");
+ fprintf(f, " VALUE *current_sp = reg_cfp->sp;\n");
fprintf(f, " reg_cfp->pc = orig_pc;\n");
fprintf(f, " reg_cfp->sp = orig_sp;\n\n");
@@ -457,7 +457,7 @@ precompile_inlinable_iseqs(FILE *f, const rb_iseq_t *iseq, struct compile_status
fprintf(f, "ALWAYS_INLINE(static VALUE _mjit%d_inlined_%d(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq));\n", status->compiled_id, pos);
fprintf(f, "static inline VALUE\n_mjit%d_inlined_%d(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE orig_self, const rb_iseq_t *original_iseq)\n{\n", status->compiled_id, pos);
fprintf(f, " const VALUE *orig_pc = reg_cfp->pc;\n");
- fprintf(f, " const VALUE *orig_sp = reg_cfp->sp;\n");
+ fprintf(f, " VALUE *orig_sp = reg_cfp->sp;\n");
bool success = mjit_compile_body(f, child_iseq, &child_status);
fprintf(f, "\n} /* end of _mjit%d_inlined_%d */\n\n", status->compiled_id, pos);