Skip to content

Commit

Permalink
Don't execute immediate subs twice. Only execute them the instant tha…
Browse files Browse the repository at this point in the history
…t they are compiled, not again later.
  • Loading branch information
Whiteknight committed Apr 19, 2012
1 parent 67eb23f commit 2ab8cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compilers/imcc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,13 @@ trigger_immediate_subs(ARGMOD(imc_info_t *imcc), ARGMOD(PackFile * pf))

PMC_get_sub(imcc->interp, sub_pmc, sub);
pragmas = PObj_get_FLAGS(sub_pmc) & SUB_FLAG_PF_MASK & ~SUB_FLAG_IS_OUTER;
if (pragmas & SUB_FLAG_PF_IMMEDIATE) {
/*if (pragmas & SUB_FLAG_PF_IMMEDIATE) {
PMC * result = PMCNULL;
Parrot_pcc_invoke_sub_from_c_args(imcc->interp, sub_pmc, "->P", &result);
ct->pmc.constants[i] = result;
PARROT_GC_WRITE_BARRIER(imcc->interp, pf->view);
}
else if (pragmas & SUB_FLAG_PF_POSTCOMP) {
else*/ if (pragmas & SUB_FLAG_PF_POSTCOMP) {
Parrot_pcc_invoke_sub_from_c_args(imcc->interp, sub_pmc, "->");
}
}
Expand Down

0 comments on commit 2ab8cb0

Please sign in to comment.