Skip to content

Commit

Permalink
invoke IMCC the correct way
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Apr 23, 2011
1 parent 4fbacba commit b97bdf7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dynpmc/instrument.pmc
Expand Up @@ -197,6 +197,7 @@ program in 'file'.
PMC *probe_iter;
PMC *pbc = PMCNULL;
PMC *interp_pmc = PMCNULL;
PMC * const imcc_pmc = Parrot_get_compiler(INTERP, Parrot_str_new(INTERP, "PIR", 0));
int counter = 0;

/* If args is not null, does array and has a size > 0, convert it
Expand Down Expand Up @@ -224,8 +225,8 @@ program in 'file'.
/* Begin Execution */
interp_pmc = VTABLE_get_pmc_keyed_int(attr->supervised,
attr->supervised->iglobals, (Parrot_Int)IGLOBALS_INTERPRETER);
status = imcc_run_api(interp_pmc, file, argc, (const char **) argv, &pbc);
if (status) {
pbc = imcc_compile_file(VTABLE_get_pointer(INTERP, imcc_pmc), file);
if (!PMC_IS_NULL(pbc)) {
PMC * const args = Parrot_pmc_box_c_string_array(interp, argc, (const char **)argv);
PackFile * const pf = (PackFile*) VTABLE_get_pointer(interp, pbc);
Parrot_pf_execute_bytecode_program(interp, pf, args);
Expand Down

0 comments on commit b97bdf7

Please sign in to comment.