ruby-changes:60966
From: Takashi <ko1@a...>
Date: Fri, 1 May 2020 18:35:37 +0900 (JST)
Subject: [ruby-changes:60966] e19f4b3ac0 (master): Fix MJIT compiler warnings in clang
https://git.ruby-lang.org/ruby.git/commit/?id=e19f4b3ac0 From e19f4b3ac0d5b21563a8f864741602e9b6889120 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Fri, 1 May 2020 02:35:18 -0700 Subject: Fix MJIT compiler warnings in clang diff --git a/mjit_compile.c b/mjit_compile.c index 9ceca5b..b64cbb4 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 https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L233 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 https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L457 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); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/