Skip to content

Commit

Permalink
Merge branch 'encapsulate-compilation-phasors'
Browse files Browse the repository at this point in the history
  • Loading branch information
plobsing committed Dec 30, 2010
2 parents 952208a + d9c0033 commit 2477d42
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 0 additions & 2 deletions compilers/imcc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,6 @@ imcc_run_pbc(PARROT_INTERP, ARGIN_NULLOK(const char *output_file),
IMCC_info(interp, 1, "Running...\n");

/* runs :init functions */
PackFile_fixup_subs(interp, PBC_IMMEDIATE, NULL);
PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);
PackFile_fixup_subs(interp, PBC_MAIN, NULL);

Parrot_runcode(interp, argc, argv);
Expand Down
1 change: 0 additions & 1 deletion frontend/parrot_debugger/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ main(int argc, const char *argv[])
Parrot_compile_file(interp, filename, &errmsg);
if (errmsg)
Parrot_ex_throw_from_c_args(interp, NULL, 1, "%S", errmsg);
PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);

/* load the source for debugger list */
PDB_load_source(interp, filename);
Expand Down
4 changes: 0 additions & 4 deletions src/embed/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ Parrot_api_ready_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
Parrot_ex_throw_from_c_args(interp, NULL, 1, "Could not get packfile");
if (pf->cur_cs != NULL)
Parrot_pbc_load(interp, pf);
PackFile_fixup_subs(interp, PBC_IMMEDIATE, NULL);
PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);
PackFile_fixup_subs(interp, PBC_MAIN, NULL);
*main_sub = Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_constants(interp, interp->ctx, interp->code->const_table);
Expand Down Expand Up @@ -446,8 +444,6 @@ Parrot_api_run_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
Parrot_ex_throw_from_c_args(interp, NULL, 1, "Could not get packfile");
if (pf->cur_cs != NULL)
Parrot_pbc_load(interp, pf);
PackFile_fixup_subs(interp, PBC_IMMEDIATE, NULL);
PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);
PackFile_fixup_subs(interp, PBC_MAIN, NULL);
main_sub = Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp));

Expand Down
13 changes: 10 additions & 3 deletions t/pmc/sub.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ C<Continuation> PMCs.
=cut

my @todo;
my $testr = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/;

pasm_output_is( <<'CODE', <<'OUTPUT', "PASM subs - invokecc" );
.const 'Sub' P0 = "func"
Expand Down Expand Up @@ -893,7 +894,9 @@ caller 1 main
ok
OUTPUT

pir_output_is( <<'CODE', <<'OUT', ':immediate :postcomp' );
SKIP: {
skip ':immediate/:postcomp only happen on compilation', 1 if $testr;
pir_output_is( <<'CODE', <<'OUT', ':immediate :postcomp' );
.sub optc :immediate :postcomp
print "initial\n"
.end
Expand All @@ -905,6 +908,7 @@ initial
initial
main
OUT
}

pir_output_like( <<'CODE', <<'OUTPUT', ':anon' );
.sub main :main
Expand Down Expand Up @@ -1130,7 +1134,9 @@ CODE
/Stringifying an Undef PMC/
OUTPUT

pir_output_is( <<'CODE', <<'OUTPUT', ':postcomp' );
SKIP: {
skip ':immediate/:postcomp only happen on compilation', 1 if $testr;
pir_output_is( <<'CODE', <<'OUTPUT', ':postcomp' );
.sub main :main
say 'main'
.end
Expand All @@ -1153,6 +1159,7 @@ pc
pc2
main
OUTPUT
}

# see also #38964
pir_output_is( <<'CODE', <<'OUTPUT', 'unicode sub names, compilation' );
Expand Down Expand Up @@ -1437,7 +1444,7 @@ I can has outer from eval?
OUTPUT

$ENV{TEST_PROG_ARGS} ||= '';
@todo = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/
@todo = $testr
? ( todo => 'lexicals not thawed properly from PBC, TT #1171' )
: ();
pir_output_is( <<'CODE', <<'OUTPUT', ':outer with identical sub names', @todo );
Expand Down

0 comments on commit 2477d42

Please sign in to comment.