Ticket #150: loadbytecode.patch
File loadbytecode.patch, 1.8 KB (added by NotFound, 12 years ago) |
---|
-
src/dynext.c
428 428 void (*init_func)(PARROT_INTERP, PMC *); 429 429 PMC *lib_pmc; 430 430 431 INTVAL regs_used[] = { 2, 2, 2, 2 }; /* Arbitrary values */ 432 const int parrot_hll_id = 0; 433 PMC * context = Parrot_push_context(interp, regs_used); 434 Parrot_pcc_set_HLL(interp, context, parrot_hll_id); 435 Parrot_pcc_set_namespace(interp, context, 436 Parrot_get_HLL_namespace(interp, parrot_hll_id)); 437 431 438 /* 432 439 * work around gcc 3.3.3 and other problem with dynpmcs 433 440 * something during library loading doesn't stand a GC run … … 475 482 /* UNLOCK */ 476 483 Parrot_unblock_GC_mark(interp); 477 484 485 Parrot_pop_context(interp); 486 478 487 return lib_pmc; 479 488 } 480 489 -
src/packfile.c
4711 4711 ASSERT_ARGS(compile_or_load_file) 4712 4712 char * const filename = Parrot_str_to_cstring(interp, path); 4713 4713 4714 INTVAL regs_used[] = { 2, 2, 2, 2 }; /* Arbitrary values */ 4715 const int parrot_hll_id = 0; 4716 PMC * context = Parrot_push_context(interp, regs_used); 4717 Parrot_pcc_set_HLL(interp, context, parrot_hll_id); 4718 Parrot_pcc_set_namespace(interp, context, 4719 Parrot_get_HLL_namespace(interp, parrot_hll_id)); 4720 4714 4721 if (file_type == PARROT_RUNTIME_FT_PBC) { 4715 4722 PackFile * const pf = PackFile_append_pbc(interp, filename); 4716 4723 Parrot_str_free_cstring(filename); … … 4738 4745 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, 4739 4746 "compiler returned NULL ByteCode '%Ss' - %Ss", path, err); 4740 4747 } 4748 4749 Parrot_pop_context(interp); 4741 4750 } 4742 4751 4743 4752 /*