Skip to content

Commit

Permalink
Be more constsistent to fix some const warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 29, 2021
1 parent 962e835 commit c33111f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/spesh/disp.c
Expand Up @@ -446,8 +446,10 @@ static void insert_resume_inits(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpesh
/* Allocate the instruction. */
MVMDispProgramResumption *dpr = &(dp->resumptions[i]);
MVMSpeshIns *ins = MVM_spesh_alloc(tc, g, sizeof(MVMSpeshIns));
ins->info = MVM_spesh_alloc(tc, g, MVM_spesh_disp_resumption_op_info_size(tc, dp, i));
MVM_spesh_disp_initialize_resumption_op_info(tc, dp, i, ins->info);
MVMOpInfo *res_op_info = MVM_spesh_alloc(tc, g,
MVM_spesh_disp_resumption_op_info_size(tc, dp, i));
MVM_spesh_disp_initialize_resumption_op_info(tc, dp, i, res_op_info);
ins->info = res_op_info;
ins->operands = MVM_spesh_alloc(tc, g, ins->info->num_operands * sizeof(MVMSpeshOperand));

/* Get a register to use for the resumption state, should it be
Expand Down
5 changes: 3 additions & 2 deletions src/spesh/graph.c
Expand Up @@ -316,10 +316,11 @@ static void build_cfg(MVMThreadContext *tc, MVMSpeshGraph *g, MVMStaticFrame *sf
/* The sp_resumption op is also var args. */
else if (info->opcode == MVM_OP_sp_resumption) {
MVMSpeshResumeInit *resume_init = &(g->resume_inits[((MVMuint16 *)args)[1]]);
info = ins_node->info = MVM_spesh_alloc(tc, g, MVM_spesh_disp_resumption_op_info_size(
MVMOpInfo *res_op_info = MVM_spesh_alloc(tc, g, MVM_spesh_disp_resumption_op_info_size(
tc, resume_init->dp, resume_init->res_idx));
MVM_spesh_disp_initialize_resumption_op_info(tc,
resume_init->dp, resume_init->res_idx, ins_node->info);
resume_init->dp, resume_init->res_idx, res_op_info);
info = ins_node->info = res_op_info;
}

/* Go over operands. */
Expand Down

0 comments on commit c33111f

Please sign in to comment.