Ticket #111: patach.patch

File patach.patch, 31.7 KB (added by jimmy, 13 years ago)
  • compilers/imcc/reg_alloc.c

     
    5959        __attribute__nonnull__(2) 
    6060        FUNC_MODIFIES(*unit); 
    6161 
    62 static void build_reglist(Parrot_Interp interp, ARGMOD(IMC_Unit *unit)) 
     62static void build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit)) 
    6363        __attribute__nonnull__(2) 
    6464        FUNC_MODIFIES(*unit); 
    6565 
     
    634634*/ 
    635635 
    636636static void 
    637 build_reglist(Parrot_Interp interp, ARGMOD(IMC_Unit *unit)) 
     637build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit)) 
    638638{ 
    639639    SymHash  const *hsh = &unit->hash; 
    640640    unsigned int    i, count, unused, n_symbols; 
  • config/gen/platform/ansi/exec.c

     
    2323 
    2424/* 
    2525 
    26 =item C<INTVAL Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command)> 
     26=item C<INTVAL Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 
    2727 
    2828Spawn a subprocess 
    2929 
     
    3232*/ 
    3333 
    3434INTVAL 
    35 Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command) 
     35Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 
    3636{ 
    3737    Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, 
    3838            "Parrot_Run_OS_Command not implemented"); 
     
    4141 
    4242/* 
    4343 
    44 =item C<INTVAL Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs)> 
     44=item C<INTVAL Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 
    4545 
    4646RT#48260: Not yet documented!!! 
    4747 
     
    5050*/ 
    5151 
    5252INTVAL 
    53 Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs) 
     53Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 
    5454{ 
    5555    Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, 
    5656            "Parrot_Run_OS_Command_Argv not implemented"); 
     
    5959 
    6060/* 
    6161 
    62 =item C<void Parrot_Exec_OS_Comman(Parrot_Interp interp, STRING *command)> 
     62=item C<void Parrot_Exec_OS_Comman(PARROT_INTERP, STRING *command)> 
    6363 
    6464RT#48260: Not yet documented!!! 
    6565 
     
    6868*/ 
    6969 
    7070void 
    71 Parrot_Exec_OS_Comman(Parrot_Interp interp, STRING *command) 
     71Parrot_Exec_OS_Comman(PARROT_INTERP, STRING *command) 
    7272{ 
    7373  Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NOSPAWN, 
    7474         "Exec not implemented"); 
  • config/gen/platform/generic/exec.c

     
    2727/* 
    2828 
    2929=item C<INTVAL 
    30 Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command)> 
     30Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 
    3131 
    3232Spawn off a subprocess and wait for the damn thing to complete, 
    3333returning the return value of the process 
     
    3737*/ 
    3838 
    3939INTVAL 
    40 Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command) 
     40Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 
    4141{ 
    4242    pid_t child; 
    4343    child = fork(); 
     
    7272/* 
    7373 
    7474=item C<INTVAL 
    75 Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs)> 
     75Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 
    7676 
    7777RT#48260: Not yet documented!!! 
    7878 
     
    8181*/ 
    8282 
    8383INTVAL 
    84 Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs) 
     84Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 
    8585{ 
    8686    pid_t child; 
    8787    int len = VTABLE_elements(interp, cmdargs); 
     
    133133/* 
    134134 
    135135=item C<void 
    136 Parrot_Exec_OS_Command(Parrot_Interp interp, STRING *command)> 
     136Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command)> 
    137137 
    138138RT #48260: Not yet documented!!! 
    139139 
     
    142142*/ 
    143143 
    144144void 
    145 Parrot_Exec_OS_Command(Parrot_Interp interp, STRING *command) 
     145Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command) 
    146146{ 
    147147    /* Be horribly profligate with memory, since we're 
    148148       about to be something else */ 
  • config/gen/platform/win32/exec.c

     
    2626/* 
    2727 
    2828=item C<INTVAL 
    29 Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command)> 
     29Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 
    3030 
    3131Spawn the subprocess specified in C<command>. 
    3232Waits for the process to complete, and then 
     
    3737*/ 
    3838 
    3939INTVAL 
    40 Parrot_Run_OS_Command(Parrot_Interp interp, STRING *command) 
     40Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 
    4141{ 
    4242    DWORD status = 0; 
    4343    STARTUPINFO si; 
     
    7979/* 
    8080 
    8181=item C<INTVAL 
    82 Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs)> 
     82Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 
    8383 
    8484Spawns a subprocess with the arguments provided in the C<cmdargs> PMC array. 
    8585The first array element should be the name of the process to spawn, 
     
    9292*/ 
    9393 
    9494INTVAL 
    95 Parrot_Run_OS_Command_Argv(Parrot_Interp interp, PMC *cmdargs) 
     95Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 
    9696{ 
    9797    DWORD status = 0; 
    9898    STARTUPINFO si; 
     
    152152/* 
    153153 
    154154=item C<void 
    155 Parrot_Exec_OS_Command(Parrot_Interp interp, STRING *command)> 
     155Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command)> 
    156156 
    157157Exits parrot and passes control to the specified process. Does not return. Raises an exception 
    158158if the exec fails. 
     
    162162*/ 
    163163 
    164164void 
    165 Parrot_Exec_OS_Command(Parrot_Interp interp, STRING *command) 
     165Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command) 
    166166{ 
    167167    int status; 
    168168    char *in = string_to_cstring(interp, command); 
  • docs/book/ch13_reference.pod

     
    44 
    55Z<CHP-10> 
    66 
    7 This chapter contains  a condensed list of PASM opcodes, PIR directives 
     7This chapter contains a condensed list of PASM opcodes, PIR directives 
    88and instructions, and Parrot command-line options, sorted alphabetically 
    99for easy reference. Any PASM opcode is valid in PIR code, so if you're 
    1010looking up PIR syntax you should check A<CHP-10-SECT-1>"PASM Opcodes", 
  • docs/dev/fhs.pod

     
    55 
    66=head1 Title 
    77 
    8 FHS - Filesystem Hieararchy Standard and Parrot 
     8FHS - Filesystem Hierarchy Standard and Parrot 
    99 
    1010=head1 AUTHOR 
    1111 
  • docs/embed.pod

     
    117117process should use the first interpreter as their parent.  Failure to do so 
    118118may result in unpredictable errors. 
    119119 
    120 =item C<Parrot_set_flag(Parrot_Interp interp, Parrot_int flags)> 
     120=item C<Parrot_set_flag(PARROT_INTERP, Parrot_int flags)> 
    121121 
    122122Sets or unsets interpreter flags.  Flags should be OR'd together.  Valid 
    123123flags include: 
     
    151151See F<interpreter.h> for the definition of these flags (TODO: document flag 
    152152definitions here). 
    153153 
    154 =item C<void Parrot_set_run_core(Parrot_Interp interp, Parrot_Run_core_t core)> 
     154=item C<void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)> 
    155155 
    156156Sets the runcore for the interpreter.  Must be called before executing any 
    157157bytecode.  Valid runcores include: 
     
    207207 
    208208=back 
    209209 
    210 =item C<void Parrot_set_executable_name(Parrot_Interp interp, Parrot_string name)> 
     210=item C<void Parrot_set_executable_name(PARROT_INTERP, Parrot_string name)> 
    211211 
    212212Sets the executable name of the calling process.  Note that the name is a 
    213213Parrot string, not a C string. 
    214214 
    215 =item C<void Parrot_destroy(Parrot_Interp interp)> 
     215=item C<void Parrot_destroy(PARROT_INTERP)> 
    216216 
    217217Destroys an interpreter.  At the time of this writing, this is a no-op. 
    218218See <Parrot_really_destroy()>. 
    219219 
    220 =item C<void Parrot_really_destroy(Parrot_Interp interp, int exit_code)> 
     220=item C<void Parrot_really_destroy(PARROT_INTERP, int exit_code)> 
    221221 
    222222Destroys an interpreter, regardless of the environment.  The exit code is 
    223223currently unused. 
    224224 
    225 =item C<void Parrot_exit(Parrot_Interp interp, int status)> 
     225=item C<void Parrot_exit(PARROT_INTERP, int status)> 
    226226 
    227227Destroys the interpreter and exits with an exit code of C<status>.  Before 
    228228exiting, the function calls all registered exit handlers in LIFO order. 
    229229C<Parrot_really_destroy()> is usually called as the last exit handler. 
    230230 
    231 =item C<void Parrot_on_exit(Parrot_Interp interp, 
     231=item C<void Parrot_on_exit(PARROT_INTERP, 
    232232                            void (*handler)(Parrot_Interp, int, void *), void *arg)> 
    233233 
    234234Registers an exit handler to be called from C<Parrot_exit()> in LIFO order. 
    235235The handler function should accept as arguments an interpreter, an integer 
    236236exit code, and an argument (which can be NULL). 
    237237 
    238 =item C<void imcc_init(Parrot_Interp interp)> 
     238=item C<void imcc_init(PARROT_INTERP)> 
    239239 
    240240Initializes the IMCC subsystem.  Required for compiling PIR. 
    241241 
     
    245245 
    246246=over 4 
    247247 
    248 =item C<Parrot_PackFile Parrot_readbc(Parrot_Interp interp, const char *path)> 
     248=item C<Parrot_PackFile Parrot_readbc(PARROT_INTERP, const char *path)> 
    249249 
    250250Reads Parrot bytecode or PIR from the file referenced by C<path>.  Returns 
    251251a packfile structure for use by C<Parrot_loadbc()>. 
    252252 
    253 =item C<void Parrot_loadbc(Parrot_Interp interp, Parrot_PackFile pf)> 
     253=item C<void Parrot_loadbc(PARROT_INTERP, Parrot_PackFile pf)> 
    254254 
    255255Loads a packfile into the interpreter.  After this operation the interpreter 
    256256is ready to run the bytecode in the packfile. 
    257257 
    258 =item C<void Parrot_runcode(Parrot_Interp interp, int argc, char *argv[])> 
     258=item C<void Parrot_runcode(PARROT_INTERP, int argc, char *argv[])> 
    259259 
    260260Runs the bytecode associated with the interpreter.  Use C<argc> and C<argv[]> 
    261261to pass arguments to the bytecode. 
    262262 
    263 =item C<Parrot_PackFile PackFile_new_dummy(Parrot_Interp interp, char *name)> 
     263=item C<Parrot_PackFile PackFile_new_dummy(PARROT_INTERP, char *name)> 
    264264 
    265265Creates a "dummy" packfile in lieu of actually creating one from a bytecode 
    266266file on disk. 
    267267 
    268 =item C<void Parrot_load_bytecode(Parrot_Interp interp, const char *path)> 
     268=item C<void Parrot_load_bytecode(PARROT_INTERP, const char *path)> 
    269269 
    270270Reads and load Parrot bytecode or PIR from the file referenced by C<path>. 
    271271You should create a dummy packfile beforehand; see C<PackFile_new_dummy> for 
     
    280280 
    281281=over 4 
    282282 
    283 =item C<int Parrot_PMC_typenum(Parrot_Interp interp, const char *type)> 
     283=item C<int Parrot_PMC_typenum(PARROT_INTERP, const char *type)> 
    284284 
    285285Returns the internal type number corresponding to C<type>.  Useful for 
    286286instantiating various Parrot data types. 
    287287 
    288 =item C<char *string_to_cstring(Parrot_Interp interp)> 
     288=item C<char *string_to_cstring(PARROT_INTERP)> 
    289289 
    290290XXX needs to be a formal Parrot_* API. 
    291291Returns the C string representation of a Parrot string. 
    292292 
    293 =item C<STRING *string_from_cstring(Parrot_Interp interp, const char *string, int len)> 
     293=item C<STRING *string_from_cstring(PARROT_INTERP, const char *string, int len)> 
    294294 
    295295XXX needs to be a formal Parrot_* API. 
    296296Returns the Parrot string representation of a C string. 
    297297 
    298 =item C<string_from_literal(Parrot_Interp interp, const char *string)> 
     298=item C<string_from_literal(PARROT_INTERP, const char *string)> 
    299299 
    300300XXX needs to be a formal Parrot_* API. 
    301301A macro for simplifying calls to C<string_from_cstring>. 
     
    306306 
    307307=over 4 
    308308 
    309 =item C<Parrot_PMC Parrot_PMC_new(Parrot_Interp interp, int typenum)> 
     309=item C<Parrot_PMC Parrot_PMC_new(PARROT_INTERP, int typenum)> 
    310310 
    311311Creates a new PMC of the type identified by C<typenum>.  Use 
    312312C<Parrot_PMC_typenum> to obtain the correct type number. 
     
    329329 
    330330=over 4 
    331331 
    332 =item C<Parrot_PMC Parrot_find_global_cur(Parrot_Interp interp, Parrot_String name)> 
     332=item C<Parrot_PMC Parrot_find_global_cur(PARROT_INTERP, Parrot_String name)> 
    333333 
    334334Find and return a global called C<name> in the current namespace.  Returns 
    335335C<PMCNULL> if not found. 
    336336 
    337 =item C<Parrot_PMC Parrot_find_global_n(Parrot_Interp interp, Parrot_String namespace, Parrot_String name)> 
     337=item C<Parrot_PMC Parrot_find_global_n(PARROT_INTERP, Parrot_String namespace, Parrot_String name)> 
    338338 
    339339Not documented yet. 
    340340 
    341 =item C<Parrot_PMC Parrot_find_global_s(Parrot_Interp interp, Parrot_String namespace, Parrot_String name)> 
     341=item C<Parrot_PMC Parrot_find_global_s(PARROT_INTERP, Parrot_String namespace, Parrot_String name)> 
    342342 
    343343Find and return a global called C<name> in the namespace C<namespace>.  Returns 
    344344C<PMCNULL> if not found. 
    345345 
    346 =item C<void Parrot_store_global_cur(Parrot_Interp interp, Parrot_String name, Parrot_PMC val)> 
     346=item C<void Parrot_store_global_cur(PARROT_INTERP, Parrot_String name, Parrot_PMC val)> 
    347347 
    348348Sets the value of a global called C<name> in the current namespace.  Does 
    349349nothing if the global is not found. 
    350350 
    351 =item C<void Parrot_store_global_n(Parrot_Interp interp, Parrot_String namespace, Parrot_String name, Parrot_PMC val)> 
     351=item C<void Parrot_store_global_n(PARROT_INTERP, Parrot_String namespace, Parrot_String name, Parrot_PMC val)> 
    352352 
    353353Not documented yet. 
    354354 
    355 =item C<void Parrot_store_global_s(Parrot_Interp interp, Parrot_String namespace, Parrot_String name, Parrot_PMC val)> 
     355=item C<void Parrot_store_global_s(PARROT_INTERP, Parrot_String namespace, Parrot_String name, Parrot_PMC val)> 
    356356 
    357357Sets the value of a global called C<name> in the namespace C<namespace>.  Does 
    358358nothing if the global is not found. 
    359359 
    360 =item C<Parrot_PMC Parrot_find_global_k(Parrot_Interp interp, Parrot_PMC namespace_key, Parrot_String name)> 
     360=item C<Parrot_PMC Parrot_find_global_k(PARROT_INTERP, Parrot_PMC namespace_key, Parrot_String name)> 
    361361 
    362362Find and return a global called C<name> in the keyed namespace C<namespace>. 
    363363Returns C<PMCNULL> if not found. 
    364364 
    365 =item C<void Parrot_store_global_k(Parrot_Interp interp, Parrot_PMC namespace_key, Parrot_String name, Parrot_PMC val)> 
     365=item C<void Parrot_store_global_k(PARROT_INTERP, Parrot_PMC namespace_key, Parrot_String name, Parrot_PMC val)> 
    366366 
    367367Sets the value of a global called C<name> in the keyed namespace C<namespace>. 
    368368Does nothing if the global is not found. 
     
    377377 
    378378=over 4 
    379379 
    380 =item C<void *Parrot_call_sub(Parrot_Interp interp, Parrot_PMC sub, const_char *signature)> 
     380=item C<void *Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub, const_char *signature)> 
    381381 
    382382Call a Parrot subroutine that returns a pointer using the supplied signature. 
    383383 
    384 =item C<Parrot_Int Parrot_call_sub_ret_int(Parrot_Interp interp, Parrot_PMC sub, const_char *signature)> 
     384=item C<Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub, const_char *signature)> 
    385385 
    386386Call a Parrot subroutine that returns an integer using the supplied signature. 
    387387 
    388 =item C<Parrot_Float Parrot_call_sub_ret_float(Parrot_Interp interp, Parrot_PMC sub, const_char *signature)> 
     388=item C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC sub, const_char *signature)> 
    389389 
    390390Call a Parrot subroutine that returns an float using the supplied signature. 
    391391 
     
    397397 
    398398=over 4 
    399399 
    400 =item C<Parrot_PMC Parrot_oo_get_class(Parrot_Interp interp, Parrot_PMC namespace)> 
     400=item C<Parrot_PMC Parrot_oo_get_class(PARROT_INTERP, Parrot_PMC namespace)> 
    401401 
    402402Returns the class corresponding to the supplied namespace. 
    403403 
    404 =item C<Parrot_PMC Parrot_Class_instantiate(Parrot_Interp interp, Parrot_PMC the_class Parrot_PMC arg)> 
     404=item C<Parrot_PMC Parrot_Class_instantiate(PARROT_INTERP, Parrot_PMC the_class Parrot_PMC arg)> 
    405405 
    406406Instantiates a new object of class C<the_class>, which can be obtained from 
    407407C<Parrot_oo_get_class()>.  Passes an optional PMC argument C<arg> to the 
  • docs/extend.pod

     
    3636 
    3737=over 4 
    3838 
    39 =item C<Parrot_call_method(Parrot_Interp interp, Parrot_PMC sub 
     39=item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub 
    4040       Parrot_PMC object, Parrot_String method, const char *signature, ...)> 
    4141 
    4242Calls a method on C<object> with the given signature and arguments. C<sub> is 
  • docs/tests.pod

     
    115115    } 
    116116 
    117117    static opcode_t* 
    118     the_test(Parrot_Interp interp, 
     118    the_test(PARROT_INTERP, 
    119119        opcode_t *cur_op, opcode_t *start) 
    120120    { 
    121121        /* Your test goes here. */ 
  • examples/c/test_main.c

     
    2828#define setopt(flag) Parrot_setflag(interp, (flag), (*argv)[0]+2); 
    2929#define unsetopt(flag) Parrot_setflag(interp, (flag), 0) 
    3030 
    31 static char *parseflags(Parrot_Interp interp, int *argc, char **argv[]); 
     31static char *parseflags(PARROT_INTERP, int *argc, char **argv[]); 
    3232 
    3333#define OPT_GC_DEBUG     128 
    3434#define OPT_DESTROY_FLAG 129 
     
    9797/* 
    9898 
    9999=item C<char * 
    100 parseflags(Parrot_Interp interp, int *argc, char **argv[])> 
     100parseflags(PARROT_INTERP, int *argc, char **argv[])> 
    101101 
    102102Parses the command-line. 
    103103 
     
    106106*/ 
    107107 
    108108static char * 
    109 parseflags(Parrot_Interp interp, int *argc, char **argv[]) 
     109parseflags(PARROT_INTERP, int *argc, char **argv[]) 
    110110{ 
    111111    struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT; 
    112112 
  • examples/compilers/japhc.c

     
    4040#  define cdebug(x) 
    4141#endif 
    4242 
    43 PMC* japh_compiler(Parrot_Interp interp, const char *s); 
     43PMC* japh_compiler(PARROT_INTERP, const char *s); 
    4444 
    4545/* 
    4646 
    4747=item C<void 
    48 Parrot_lib_japhc_init(Parrot_Interp interp, PMC* lib)> 
     48Parrot_lib_japhc_init(PARROT_INTERP, PMC* lib)> 
    4949 
    5050loadlib calls the load and init hooks 
    5151we use init to register the compiler 
     
    5555*/ 
    5656 
    5757void 
    58 Parrot_lib_japhc_init(Parrot_Interp interp, PMC* lib) 
     58Parrot_lib_japhc_init(PARROT_INTERP, PMC* lib) 
    5959{ 
    6060    STRING *cmp; 
    6161 
     
    102102/* 
    103103 
    104104=item C<static int 
    105 add_const_str(Parrot_Interp interp, PackFile_ConstTable *consts, char *str)> 
     105add_const_str(PARROT_INTERP, PackFile_ConstTable *consts, char *str)> 
    106106 
    107107add constant string to constant_table 
    108108 
     
    111111*/ 
    112112 
    113113static int 
    114 add_const_str(Parrot_Interp interp, PackFile_ConstTable *consts, char *str) 
     114add_const_str(PARROT_INTERP, PackFile_ConstTable *consts, char *str) 
    115115{ 
    116116    int k, l; 
    117117    char *o; 
     
    156156 
    157157/* 
    158158 
    159 =item C<PMC* japh_compiler(Parrot_Interp interp, const char *program)> 
     159=item C<PMC* japh_compiler(PARROT_INTERP, const char *program)> 
    160160 
    161161simple compiler - no error checking 
    162162 
     
    165165*/ 
    166166 
    167167PMC* 
    168 japh_compiler(Parrot_Interp interp, const char *program) 
     168japh_compiler(PARROT_INTERP, const char *program) 
    169169{ 
    170170    PackFile_ByteCode *cur_cs, *old_cs; 
    171171    PackFile_ConstTable *consts; 
  • ext/Parrot-Embed/lib/Parrot/Embed.xs

     
    2323} PMC_struct; 
    2424 
    2525Interpreter_struct* 
    26 make_interp( pTHX_ SV *parent, Parrot_Interp interp ) 
     26make_interp( pTHX_ SV *parent, PARROT_INTERP ) 
    2727{ 
    2828        Interpreter_struct *interp_struct; 
    2929        if (interp == NULL) 
  • include/parrot/embed.h

     
    6464PARROT_DOES_NOT_RETURN 
    6565void Parrot_exit(Parrot_Interp, int status); 
    6666 
    67 PARROT_EXPORT void Parrot_run_native(Parrot_Interp interp, native_func_t func); 
     67PARROT_EXPORT void Parrot_run_native(PARROT_INTERP, native_func_t func); 
    6868 
    6969/* Parrot_set_config_hash exists in *_config.o (e.g install_config.o), 
    7070   so if you make this call then you will need to link with it in 
  • include/parrot/interpreter.h

     
    9292    PARROT_CLONE_CC = 0x80,         /* clone current continuation -- 
    9393                                     * fork()-like cloning (requires 
    9494                                     * cloned code segments); probably 
    95                                      * would only work if runloop_level is 1 
    96                                      */ 
     95                                     * would only work if runloop_level is 1 */ 
    9796 
    9897    /* combinations of flags */ 
    9998    PARROT_CLONE_DEFAULT = 0x7f /* everything but CC */ 
     
    101100/* &end_gen */ 
    102101 
    103102struct parrot_interp_t; 
    104 /* One of the most common shim arguments is the interpreter itself, so it 
    105  * gets its own macro. 
    106  */ 
    107103 
     104/* One of the most common shim arguments is the interpreter itself, so it 
     105 * gets its own macro. */ 
    108106#define PARROT_INTERP /*@notnull@*/ /*@in@*/ Parrot_Interp interp 
    109107#define NULLOK_INTERP /*@null@*/    /*@in@*/ Parrot_Interp interp 
    110108#define SHIM_INTERP   /*@unused@*/ /*@null@*/ Parrot_Interp interp_unused __attribute__unused__ 
     
    151149    Warnings_classes classes; 
    152150} *Warnings; 
    153151 
    154 /* 
    155  * ProfData have these extra items in front followed by 
    156  * one entry per op at (op + extra) 
    157  */ 
     152/* ProfData have these extra items in front followed by 
     153 * one entry per op at (op + extra) */ 
    158154 
    159155typedef enum { 
    160156     PARROT_PROF_DOD_p1,        /* pass 1 mark root set */ 
     
    167163     PARROT_PROF_EXTRA 
    168164} profile_extra_enum; 
    169165 
    170 /* 
    171  * data[op_count] is time spent for exception handling 
    172  */ 
     166/* data[op_count] is time spent for exception handling */ 
    173167typedef struct ProfData { 
    174168    int op; 
    175169    UINTVAL numcalls; 
     
    184178} RunProfile; 
    185179 
    186180/* Forward declaration for imc_info_t -- the actual struct is 
    187  * defined in imcc/imc.h 
    188  */ 
     181 * defined in imcc/imc.h */ 
    189182struct _imc_info_t; 
    190183 
    191184typedef union { 
     
    210203    struct Parrot_Context *caller_ctx;  /* caller context */ 
    211204    Regs_ni                bp;          /* pointers to FLOATVAL & INTVAL */ 
    212205    Regs_ps                bp_ps;       /* pointers to PMC & STR */ 
     206 
    213207    /* end common header */ 
    214208    INTVAL *n_regs_used;                /* INSP in PBC points to Sub */ 
    215209    size_t regs_mem_size;               /* memory occupied by registers */ 
     
    223217    UINTVAL errors;            /* fatals that can be turned off */ 
    224218    UINTVAL trace_flags; 
    225219    UINTVAL recursion_depth;    /* Sub call recursion depth */ 
    226     /* 
    227      * new call scheme and introspective variables 
    228      */ 
     220 
     221    /* new call scheme and introspective variables */ 
    229222    PMC *current_sub;           /* the Sub we are executing */ 
    230     /* 
    231      * for now use a return continuation PMC 
    232      */ 
     223 
     224    /* for now use a return continuation PMC */ 
    233225    PMC *current_cont;          /* the return continuation PMC */ 
    234226    PMC *current_object;        /* current object if a method call */ 
    235227    opcode_t *current_pc;       /* program counter of Sub invocation */ 
     
    240232    PMC *handlers;              /* local handlers for the context */ 
    241233    /* deref the constants - we need it all the time */ 
    242234    struct PackFile_Constant ** constants; 
     235 
    243236    /* code->prederefed.code - code->base.data in opcodes 
    244      * to simplify conversio between code ptrs in e.g. invoke 
    245      */ 
     237     * to simplify conversio between code ptrs in e.g. invoke */ 
    246238    size_t pred_offset; 
    247239}; 
    248240 
     
    298290 * used to resume execution at a point in the runloop where an exception 
    299291 * handler can be run. Ultimately this information should be part of 
    300292 * Parrot_Context, but at this point a new context isn't created for every 
    301  * runloop ID, so it still needs to be a separate stack for a while longer.*/ 
     293 * runloop ID, so it still needs to be a separate stack for a while longer. */ 
    302294 
    303295typedef struct parrot_runloop_t { 
    304296    Parrot_jump_buff resume;     /* jmp_buf */ 
     
    508500 
    509501VAR_SCOPE native_func_t run_native; 
    510502 
    511 typedef PMC *(*Parrot_compiler_func_t)(Parrot_Interp interp, 
     503typedef PMC *(*Parrot_compiler_func_t)(PARROT_INTERP, 
    512504                                       const char * program); 
    513505 
    514506/* HEADERIZER BEGIN: src/inter_create.c */ 
     
    957949/* interpreter.pmc */ 
    958950void clone_interpreter(Parrot_Interp dest, Parrot_Interp self, INTVAL flags); 
    959951 
    960 void Parrot_setup_event_func_ptrs(Parrot_Interp interp); 
     952void Parrot_setup_event_func_ptrs(PARROT_INTERP); 
    961953 
    962954PARROT_EXPORT void disable_event_checking(PARROT_INTERP); 
    963955PARROT_EXPORT void enable_event_checking(PARROT_INTERP); 
     
    973965struct Parrot_Interp_; 
    974966typedef struct Parrot_Interp_ *Parrot_Interp; 
    975967 
    976 typedef void * *(*native_func_t)(Parrot_Interp interp, 
     968typedef void * *(*native_func_t)(PARROT_INTERP, 
    977969                                 void *cur_opcode, 
    978970                                 void *start_code); 
    979971 
  • languages/dotnet/ops/dotnet.ops

     
    8383 
    8484 
    8585/* Overflow exception thrower. */ 
    86 static opcode_t* dotnet_OverflowException(Parrot_Interp interp, opcode_t *ret) 
     86static opcode_t* dotnet_OverflowException(PARROT_INTERP, opcode_t *ret) 
    8787{ 
    8888    PMC *ex_pmc = pmc_new(interp, enum_class_Exception); 
    8989    VTABLE_set_string_native(interp, ex_pmc, 
  • src/parrot_debugger.c

     
    115115#include "parrot/debugger.h" 
    116116 
    117117static void PDB_printwelcome(void); 
    118 static void PDB_run_code(Parrot_Interp interp, int argc, char *argv[]); 
     118static void PDB_run_code(PARROT_INTERP, int argc, char *argv[]); 
    119119 
    120120/* 
    121121 
     
    249249*/ 
    250250 
    251251static void 
    252 PDB_run_code(Parrot_Interp interp, int argc, char *argv[]) 
     252PDB_run_code(PARROT_INTERP, int argc, char *argv[]) 
    253253{ 
    254254    new_runloop_jump_point(interp); 
    255255    if (setjmp(interp->current_runloop->resume)) { 
  • src/pbc_disassemble.c

     
    8282 
    8383/* 
    8484 
    85 =item C<static void do_dis(Parrot_Interp interp)> 
     85=item C<static void do_dis(PARROT_INTERP)> 
    8686 
    8787Do the disassembling. 
    8888 
     
    9191*/ 
    9292 
    9393static void 
    94 do_dis(Parrot_Interp interp) 
     94do_dis(PARROT_INTERP) 
    9595{ 
    9696    Parrot_disassemble(interp); 
    9797} 
  • src/pmc/parrotinterpreter.pmc

     
    170170} 
    171171 
    172172static int 
    173 recursion_limit(Parrot_Interp interp, PMC *self, int l) 
     173recursion_limit(PARROT_INTERP, PMC *self, int l) 
    174174{ 
    175175    const int ret           = interp->recursion_limit; 
    176176    interp->recursion_limit = l; 
  • t/src/basic.t

     
    66use warnings; 
    77use lib qw( . lib ../lib ../../lib ); 
    88use Test::More; 
    9 use Parrot::Test; 
     9use Parrot::Test tests => 3; 
    1010 
    11 plan tests => 3; 
    12  
    1311=head1 NAME 
    1412 
    1513t/src/basic.t - Basics 
  • t/src/compiler.t

     
    66use warnings; 
    77use lib qw( . lib ../lib ../../lib ); 
    88use Test::More; 
    9 use Parrot::Test; 
     9use Parrot::Test tests => 5; 
    1010 
    11 $^O eq 'MSWin32' 
    12     ? plan( skip_all => 'linking problem' ) 
    13     : plan( tests => 5 ); 
    14  
    1511=head1 NAME 
    1612 
    1713t/src/compiler.t - Compile and run a PIR program from C. 
     
    3531#include "parrot/extend.h" 
    3632 
    3733static opcode_t * 
    38 run(Parrot_Interp interp, int argc, char *argv[]) 
     34run(PARROT_INTERP, int argc, char *argv[]) 
    3935{ 
    4036    const char *c_src = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n"; 
    4137 
     
    117113#include "parrot/extend.h" 
    118114 
    119115static void 
    120 compile_run(Parrot_Interp interp, const char *src, STRING *type, int argc, 
     116compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 
    121117            char *argv[]) 
    122118{ 
    123119    STRING   *smain; 
     
    150146} 
    151147 
    152148static opcode_t * 
    153 run(Parrot_Interp interp, int argc, char *argv[]) 
     149run(PARROT_INTERP, int argc, char *argv[]) 
    154150{ 
    155151    const char *c_src  = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n"; 
    156152 
     
    210206#include "parrot/extend.h" 
    211207 
    212208static void 
    213 compile_run(Parrot_Interp interp, const char *src, STRING *type, int argc, 
     209compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 
    214210            char *argv[]) 
    215211{ 
    216212    STRING   *smain; 
     
    243239} 
    244240 
    245241static opcode_t * 
    246 run(Parrot_Interp interp, int argc, char *argv[]) 
     242run(PARROT_INTERP, int argc, char *argv[]) 
    247243{ 
    248244    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n"; 
    249245 
     
    303299#include "parrot/extend.h" 
    304300 
    305301static void 
    306 compile_run(Parrot_Interp interp, const char *src, STRING *type, int argc, 
     302compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 
    307303            char *argv[]) 
    308304{ 
    309305    STRING   *smain; 
     
    336332} 
    337333 
    338334static opcode_t * 
    339 run(Parrot_Interp interp, int argc, char *argv[]) 
     335run(PARROT_INTERP, int argc, char *argv[]) 
    340336{ 
    341337    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n"; 
    342338 
     
    395391#include "parrot/extend.h" 
    396392 
    397393static void 
    398 compile_run(Parrot_Interp interp, const char *src, STRING *type, int argc, 
     394compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 
    399395            char *argv[]) 
    400396{ 
    401397    STRING   *smain; 
     
    428424} 
    429425 
    430426static opcode_t * 
    431 run(Parrot_Interp interp, int argc, char *argv[]) 
     427run(PARROT_INTERP, int argc, char *argv[]) 
    432428{ 
    433429    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n"; 
    434430 
  • t/src/exit.t

     
    66use warnings; 
    77use lib qw( . lib ../lib ../../lib ); 
    88use Test::More; 
    9 use Parrot::Test; 
     9use Parrot::Test tests => 1; 
    1010 
    11 plan tests => 1; 
    12  
    1311=head1 NAME 
    1412 
    1513t/src/exit.t - Exiting 
     
    3028#include <parrot/embed.h> 
    3129 
    3230void 
    33 ex1(Parrot_Interp interp, int x, void*p) 
     31ex1(PARROT_INTERP, int x, void*p) 
    3432{ 
    3533    printf("ex1\n"); 
    3634} 
    3735 
    3836void 
    39 ex2(Parrot_Interp interp, int x, void*p) 
     37ex2(PARROT_INTERP, int x, void*p) 
    4038{ 
    4139    printf("ex2\n"); 
    4240} 
    4341 
    4442void 
    45 ex3(Parrot_Interp interp, int x, void*p) 
     43ex3(PARROT_INTERP, int x, void*p) 
    4644{ 
    4745    Parrot_io_printf(interp, "ex3\n"); 
    4846} 
  • t/src/extend.t

     
    184184#include "parrot/extend.h" 
    185185 
    186186static opcode_t* 
    187 the_test(Parrot_Interp interp, opcode_t *cur_op, opcode_t *start) 
     187the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 
    188188{ 
    189189    Parrot_Int type  = Parrot_PMC_typenum(interp, "ResizablePMCArray"); 
    190190    Parrot_PMC array = Parrot_PMC_new(interp, type); 
     
    438438 * so that buffering in PIO is not an issue */ 
    439439 
    440440static opcode_t* 
    441 the_test(Parrot_Interp interp, opcode_t *cur_op, opcode_t *start) 
     441the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 
    442442{ 
    443443    PackFile *pf = Parrot_readbc(interp, "$temp_pbc"); 
    444444    STRING   *name = const_string(interp, "_sub1"); 
     
    512512 * so that buffering in PIO is not an issue */ 
    513513 
    514514static opcode_t* 
    515 the_test(Parrot_Interp interp, opcode_t *cur_op, opcode_t *start) 
     515the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 
    516516{ 
    517517    PackFile         *pf   = Parrot_readbc(interp, "$temp_pbc"); 
    518518    STRING           *name = const_string(interp, "_sub1"); 
     
    709709 */ 
    710710void interp_cleanup(Parrot_Interp, int); 
    711711 
    712 void interp_cleanup(Parrot_Interp interp, int status) 
     712void interp_cleanup(PARROT_INTERP, int status) 
    713713{ 
    714714    handler_node_t *node = interp->exit_handler_list; 
    715715