Permalink
Browse files

Don't execute immediate subs twice. Only execute them the instant tha…

…t they are compiled, not again later.
  • Loading branch information...
1 parent 67eb23f commit 2ab8cb031f311fdf42f4bdb751387086a405036d @Whiteknight Whiteknight committed Apr 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 compilers/imcc/main.c
View
4 compilers/imcc/main.c
@@ -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, "->");
}
}

0 comments on commit 2ab8cb0

Please sign in to comment.