Ticket #111: patach.patch
File patach.patch, 31.7 KB (added by jimmy, 13 years ago) |
---|
-
compilers/imcc/reg_alloc.c
59 59 __attribute__nonnull__(2) 60 60 FUNC_MODIFIES(*unit); 61 61 62 static void build_reglist( Parrot_Interp interp, ARGMOD(IMC_Unit *unit))62 static void build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit)) 63 63 __attribute__nonnull__(2) 64 64 FUNC_MODIFIES(*unit); 65 65 … … 634 634 */ 635 635 636 636 static void 637 build_reglist( Parrot_Interp interp, ARGMOD(IMC_Unit *unit))637 build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit)) 638 638 { 639 639 SymHash const *hsh = &unit->hash; 640 640 unsigned int i, count, unused, n_symbols; -
config/gen/platform/ansi/exec.c
23 23 24 24 /* 25 25 26 =item C<INTVAL Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)>26 =item C<INTVAL Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 27 27 28 28 Spawn a subprocess 29 29 … … 32 32 */ 33 33 34 34 INTVAL 35 Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)35 Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 36 36 { 37 37 Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, 38 38 "Parrot_Run_OS_Command not implemented"); … … 41 41 42 42 /* 43 43 44 =item C<INTVAL Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)>44 =item C<INTVAL Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 45 45 46 46 RT#48260: Not yet documented!!! 47 47 … … 50 50 */ 51 51 52 52 INTVAL 53 Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)53 Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 54 54 { 55 55 Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, 56 56 "Parrot_Run_OS_Command_Argv not implemented"); … … 59 59 60 60 /* 61 61 62 =item C<void Parrot_Exec_OS_Comman(P arrot_Interp interp, STRING *command)>62 =item C<void Parrot_Exec_OS_Comman(PARROT_INTERP, STRING *command)> 63 63 64 64 RT#48260: Not yet documented!!! 65 65 … … 68 68 */ 69 69 70 70 void 71 Parrot_Exec_OS_Comman(P arrot_Interp interp, STRING *command)71 Parrot_Exec_OS_Comman(PARROT_INTERP, STRING *command) 72 72 { 73 73 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NOSPAWN, 74 74 "Exec not implemented"); -
config/gen/platform/generic/exec.c
27 27 /* 28 28 29 29 =item C<INTVAL 30 Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)>30 Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 31 31 32 32 Spawn off a subprocess and wait for the damn thing to complete, 33 33 returning the return value of the process … … 37 37 */ 38 38 39 39 INTVAL 40 Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)40 Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 41 41 { 42 42 pid_t child; 43 43 child = fork(); … … 72 72 /* 73 73 74 74 =item C<INTVAL 75 Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)>75 Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 76 76 77 77 RT#48260: Not yet documented!!! 78 78 … … 81 81 */ 82 82 83 83 INTVAL 84 Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)84 Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 85 85 { 86 86 pid_t child; 87 87 int len = VTABLE_elements(interp, cmdargs); … … 133 133 /* 134 134 135 135 =item C<void 136 Parrot_Exec_OS_Command(P arrot_Interp interp, STRING *command)>136 Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command)> 137 137 138 138 RT #48260: Not yet documented!!! 139 139 … … 142 142 */ 143 143 144 144 void 145 Parrot_Exec_OS_Command(P arrot_Interp interp, STRING *command)145 Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command) 146 146 { 147 147 /* Be horribly profligate with memory, since we're 148 148 about to be something else */ -
config/gen/platform/win32/exec.c
26 26 /* 27 27 28 28 =item C<INTVAL 29 Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)>29 Parrot_Run_OS_Command(PARROT_INTERP, STRING *command)> 30 30 31 31 Spawn the subprocess specified in C<command>. 32 32 Waits for the process to complete, and then … … 37 37 */ 38 38 39 39 INTVAL 40 Parrot_Run_OS_Command(P arrot_Interp interp, STRING *command)40 Parrot_Run_OS_Command(PARROT_INTERP, STRING *command) 41 41 { 42 42 DWORD status = 0; 43 43 STARTUPINFO si; … … 79 79 /* 80 80 81 81 =item C<INTVAL 82 Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)>82 Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs)> 83 83 84 84 Spawns a subprocess with the arguments provided in the C<cmdargs> PMC array. 85 85 The first array element should be the name of the process to spawn, … … 92 92 */ 93 93 94 94 INTVAL 95 Parrot_Run_OS_Command_Argv(P arrot_Interp interp, PMC *cmdargs)95 Parrot_Run_OS_Command_Argv(PARROT_INTERP, PMC *cmdargs) 96 96 { 97 97 DWORD status = 0; 98 98 STARTUPINFO si; … … 152 152 /* 153 153 154 154 =item C<void 155 Parrot_Exec_OS_Command(P arrot_Interp interp, STRING *command)>155 Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command)> 156 156 157 157 Exits parrot and passes control to the specified process. Does not return. Raises an exception 158 158 if the exec fails. … … 162 162 */ 163 163 164 164 void 165 Parrot_Exec_OS_Command(P arrot_Interp interp, STRING *command)165 Parrot_Exec_OS_Command(PARROT_INTERP, STRING *command) 166 166 { 167 167 int status; 168 168 char *in = string_to_cstring(interp, command); -
docs/book/ch13_reference.pod
4 4 5 5 Z<CHP-10> 6 6 7 This chapter contains 7 This chapter contains a condensed list of PASM opcodes, PIR directives 8 8 and instructions, and Parrot command-line options, sorted alphabetically 9 9 for easy reference. Any PASM opcode is valid in PIR code, so if you're 10 10 looking up PIR syntax you should check A<CHP-10-SECT-1>"PASM Opcodes", -
docs/dev/fhs.pod
5 5 6 6 =head1 Title 7 7 8 FHS - Filesystem Hie ararchy Standard and Parrot8 FHS - Filesystem Hierarchy Standard and Parrot 9 9 10 10 =head1 AUTHOR 11 11 -
docs/embed.pod
117 117 process should use the first interpreter as their parent. Failure to do so 118 118 may result in unpredictable errors. 119 119 120 =item C<Parrot_set_flag(P arrot_Interp interp, Parrot_int flags)>120 =item C<Parrot_set_flag(PARROT_INTERP, Parrot_int flags)> 121 121 122 122 Sets or unsets interpreter flags. Flags should be OR'd together. Valid 123 123 flags include: … … 151 151 See F<interpreter.h> for the definition of these flags (TODO: document flag 152 152 definitions here). 153 153 154 =item C<void Parrot_set_run_core(P arrot_Interp interp, Parrot_Run_core_t core)>154 =item C<void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)> 155 155 156 156 Sets the runcore for the interpreter. Must be called before executing any 157 157 bytecode. Valid runcores include: … … 207 207 208 208 =back 209 209 210 =item C<void Parrot_set_executable_name(P arrot_Interp interp, Parrot_string name)>210 =item C<void Parrot_set_executable_name(PARROT_INTERP, Parrot_string name)> 211 211 212 212 Sets the executable name of the calling process. Note that the name is a 213 213 Parrot string, not a C string. 214 214 215 =item C<void Parrot_destroy(P arrot_Interp interp)>215 =item C<void Parrot_destroy(PARROT_INTERP)> 216 216 217 217 Destroys an interpreter. At the time of this writing, this is a no-op. 218 218 See <Parrot_really_destroy()>. 219 219 220 =item C<void Parrot_really_destroy(P arrot_Interp interp, int exit_code)>220 =item C<void Parrot_really_destroy(PARROT_INTERP, int exit_code)> 221 221 222 222 Destroys an interpreter, regardless of the environment. The exit code is 223 223 currently unused. 224 224 225 =item C<void Parrot_exit(P arrot_Interp interp, int status)>225 =item C<void Parrot_exit(PARROT_INTERP, int status)> 226 226 227 227 Destroys the interpreter and exits with an exit code of C<status>. Before 228 228 exiting, the function calls all registered exit handlers in LIFO order. 229 229 C<Parrot_really_destroy()> is usually called as the last exit handler. 230 230 231 =item C<void Parrot_on_exit(P arrot_Interp interp,231 =item C<void Parrot_on_exit(PARROT_INTERP, 232 232 void (*handler)(Parrot_Interp, int, void *), void *arg)> 233 233 234 234 Registers an exit handler to be called from C<Parrot_exit()> in LIFO order. 235 235 The handler function should accept as arguments an interpreter, an integer 236 236 exit code, and an argument (which can be NULL). 237 237 238 =item C<void imcc_init(P arrot_Interp interp)>238 =item C<void imcc_init(PARROT_INTERP)> 239 239 240 240 Initializes the IMCC subsystem. Required for compiling PIR. 241 241 … … 245 245 246 246 =over 4 247 247 248 =item C<Parrot_PackFile Parrot_readbc(P arrot_Interp interp, const char *path)>248 =item C<Parrot_PackFile Parrot_readbc(PARROT_INTERP, const char *path)> 249 249 250 250 Reads Parrot bytecode or PIR from the file referenced by C<path>. Returns 251 251 a packfile structure for use by C<Parrot_loadbc()>. 252 252 253 =item C<void Parrot_loadbc(P arrot_Interp interp, Parrot_PackFile pf)>253 =item C<void Parrot_loadbc(PARROT_INTERP, Parrot_PackFile pf)> 254 254 255 255 Loads a packfile into the interpreter. After this operation the interpreter 256 256 is ready to run the bytecode in the packfile. 257 257 258 =item C<void Parrot_runcode(P arrot_Interp interp, int argc, char *argv[])>258 =item C<void Parrot_runcode(PARROT_INTERP, int argc, char *argv[])> 259 259 260 260 Runs the bytecode associated with the interpreter. Use C<argc> and C<argv[]> 261 261 to pass arguments to the bytecode. 262 262 263 =item C<Parrot_PackFile PackFile_new_dummy(P arrot_Interp interp, char *name)>263 =item C<Parrot_PackFile PackFile_new_dummy(PARROT_INTERP, char *name)> 264 264 265 265 Creates a "dummy" packfile in lieu of actually creating one from a bytecode 266 266 file on disk. 267 267 268 =item C<void Parrot_load_bytecode(P arrot_Interp interp, const char *path)>268 =item C<void Parrot_load_bytecode(PARROT_INTERP, const char *path)> 269 269 270 270 Reads and load Parrot bytecode or PIR from the file referenced by C<path>. 271 271 You should create a dummy packfile beforehand; see C<PackFile_new_dummy> for … … 280 280 281 281 =over 4 282 282 283 =item C<int Parrot_PMC_typenum(P arrot_Interp interp, const char *type)>283 =item C<int Parrot_PMC_typenum(PARROT_INTERP, const char *type)> 284 284 285 285 Returns the internal type number corresponding to C<type>. Useful for 286 286 instantiating various Parrot data types. 287 287 288 =item C<char *string_to_cstring(P arrot_Interp interp)>288 =item C<char *string_to_cstring(PARROT_INTERP)> 289 289 290 290 XXX needs to be a formal Parrot_* API. 291 291 Returns the C string representation of a Parrot string. 292 292 293 =item C<STRING *string_from_cstring(P arrot_Interp interp, const char *string, int len)>293 =item C<STRING *string_from_cstring(PARROT_INTERP, const char *string, int len)> 294 294 295 295 XXX needs to be a formal Parrot_* API. 296 296 Returns the Parrot string representation of a C string. 297 297 298 =item C<string_from_literal(P arrot_Interp interp, const char *string)>298 =item C<string_from_literal(PARROT_INTERP, const char *string)> 299 299 300 300 XXX needs to be a formal Parrot_* API. 301 301 A macro for simplifying calls to C<string_from_cstring>. … … 306 306 307 307 =over 4 308 308 309 =item C<Parrot_PMC Parrot_PMC_new(P arrot_Interp interp, int typenum)>309 =item C<Parrot_PMC Parrot_PMC_new(PARROT_INTERP, int typenum)> 310 310 311 311 Creates a new PMC of the type identified by C<typenum>. Use 312 312 C<Parrot_PMC_typenum> to obtain the correct type number. … … 329 329 330 330 =over 4 331 331 332 =item C<Parrot_PMC Parrot_find_global_cur(P arrot_Interp interp, Parrot_String name)>332 =item C<Parrot_PMC Parrot_find_global_cur(PARROT_INTERP, Parrot_String name)> 333 333 334 334 Find and return a global called C<name> in the current namespace. Returns 335 335 C<PMCNULL> if not found. 336 336 337 =item C<Parrot_PMC Parrot_find_global_n(P arrot_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)> 338 338 339 339 Not documented yet. 340 340 341 =item C<Parrot_PMC Parrot_find_global_s(P arrot_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)> 342 342 343 343 Find and return a global called C<name> in the namespace C<namespace>. Returns 344 344 C<PMCNULL> if not found. 345 345 346 =item C<void Parrot_store_global_cur(P arrot_Interp interp, Parrot_String name, Parrot_PMC val)>346 =item C<void Parrot_store_global_cur(PARROT_INTERP, Parrot_String name, Parrot_PMC val)> 347 347 348 348 Sets the value of a global called C<name> in the current namespace. Does 349 349 nothing if the global is not found. 350 350 351 =item C<void Parrot_store_global_n(P arrot_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)> 352 352 353 353 Not documented yet. 354 354 355 =item C<void Parrot_store_global_s(P arrot_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)> 356 356 357 357 Sets the value of a global called C<name> in the namespace C<namespace>. Does 358 358 nothing if the global is not found. 359 359 360 =item C<Parrot_PMC Parrot_find_global_k(P arrot_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)> 361 361 362 362 Find and return a global called C<name> in the keyed namespace C<namespace>. 363 363 Returns C<PMCNULL> if not found. 364 364 365 =item C<void Parrot_store_global_k(P arrot_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)> 366 366 367 367 Sets the value of a global called C<name> in the keyed namespace C<namespace>. 368 368 Does nothing if the global is not found. … … 377 377 378 378 =over 4 379 379 380 =item C<void *Parrot_call_sub(P arrot_Interp interp, Parrot_PMC sub, const_char *signature)>380 =item C<void *Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub, const_char *signature)> 381 381 382 382 Call a Parrot subroutine that returns a pointer using the supplied signature. 383 383 384 =item C<Parrot_Int Parrot_call_sub_ret_int(P arrot_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)> 385 385 386 386 Call a Parrot subroutine that returns an integer using the supplied signature. 387 387 388 =item C<Parrot_Float Parrot_call_sub_ret_float(P arrot_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)> 389 389 390 390 Call a Parrot subroutine that returns an float using the supplied signature. 391 391 … … 397 397 398 398 =over 4 399 399 400 =item C<Parrot_PMC Parrot_oo_get_class(P arrot_Interp interp, Parrot_PMC namespace)>400 =item C<Parrot_PMC Parrot_oo_get_class(PARROT_INTERP, Parrot_PMC namespace)> 401 401 402 402 Returns the class corresponding to the supplied namespace. 403 403 404 =item C<Parrot_PMC Parrot_Class_instantiate(P arrot_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)> 405 405 406 406 Instantiates a new object of class C<the_class>, which can be obtained from 407 407 C<Parrot_oo_get_class()>. Passes an optional PMC argument C<arg> to the -
docs/extend.pod
36 36 37 37 =over 4 38 38 39 =item C<Parrot_call_method(P arrot_Interp interp, Parrot_PMC sub39 =item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub 40 40 Parrot_PMC object, Parrot_String method, const char *signature, ...)> 41 41 42 42 Calls a method on C<object> with the given signature and arguments. C<sub> is -
docs/tests.pod
115 115 } 116 116 117 117 static opcode_t* 118 the_test(P arrot_Interp interp,118 the_test(PARROT_INTERP, 119 119 opcode_t *cur_op, opcode_t *start) 120 120 { 121 121 /* Your test goes here. */ -
examples/c/test_main.c
28 28 #define setopt(flag) Parrot_setflag(interp, (flag), (*argv)[0]+2); 29 29 #define unsetopt(flag) Parrot_setflag(interp, (flag), 0) 30 30 31 static char *parseflags(P arrot_Interp interp, int *argc, char **argv[]);31 static char *parseflags(PARROT_INTERP, int *argc, char **argv[]); 32 32 33 33 #define OPT_GC_DEBUG 128 34 34 #define OPT_DESTROY_FLAG 129 … … 97 97 /* 98 98 99 99 =item C<char * 100 parseflags(P arrot_Interp interp, int *argc, char **argv[])>100 parseflags(PARROT_INTERP, int *argc, char **argv[])> 101 101 102 102 Parses the command-line. 103 103 … … 106 106 */ 107 107 108 108 static char * 109 parseflags(P arrot_Interp interp, int *argc, char **argv[])109 parseflags(PARROT_INTERP, int *argc, char **argv[]) 110 110 { 111 111 struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT; 112 112 -
examples/compilers/japhc.c
40 40 # define cdebug(x) 41 41 #endif 42 42 43 PMC* japh_compiler(P arrot_Interp interp, const char *s);43 PMC* japh_compiler(PARROT_INTERP, const char *s); 44 44 45 45 /* 46 46 47 47 =item C<void 48 Parrot_lib_japhc_init(P arrot_Interp interp, PMC* lib)>48 Parrot_lib_japhc_init(PARROT_INTERP, PMC* lib)> 49 49 50 50 loadlib calls the load and init hooks 51 51 we use init to register the compiler … … 55 55 */ 56 56 57 57 void 58 Parrot_lib_japhc_init(P arrot_Interp interp, PMC* lib)58 Parrot_lib_japhc_init(PARROT_INTERP, PMC* lib) 59 59 { 60 60 STRING *cmp; 61 61 … … 102 102 /* 103 103 104 104 =item C<static int 105 add_const_str(P arrot_Interp interp, PackFile_ConstTable *consts, char *str)>105 add_const_str(PARROT_INTERP, PackFile_ConstTable *consts, char *str)> 106 106 107 107 add constant string to constant_table 108 108 … … 111 111 */ 112 112 113 113 static int 114 add_const_str(P arrot_Interp interp, PackFile_ConstTable *consts, char *str)114 add_const_str(PARROT_INTERP, PackFile_ConstTable *consts, char *str) 115 115 { 116 116 int k, l; 117 117 char *o; … … 156 156 157 157 /* 158 158 159 =item C<PMC* japh_compiler(P arrot_Interp interp, const char *program)>159 =item C<PMC* japh_compiler(PARROT_INTERP, const char *program)> 160 160 161 161 simple compiler - no error checking 162 162 … … 165 165 */ 166 166 167 167 PMC* 168 japh_compiler(P arrot_Interp interp, const char *program)168 japh_compiler(PARROT_INTERP, const char *program) 169 169 { 170 170 PackFile_ByteCode *cur_cs, *old_cs; 171 171 PackFile_ConstTable *consts; -
ext/Parrot-Embed/lib/Parrot/Embed.xs
23 23 } PMC_struct; 24 24 25 25 Interpreter_struct* 26 make_interp( pTHX_ SV *parent, P arrot_Interp interp)26 make_interp( pTHX_ SV *parent, PARROT_INTERP ) 27 27 { 28 28 Interpreter_struct *interp_struct; 29 29 if (interp == NULL) -
include/parrot/embed.h
64 64 PARROT_DOES_NOT_RETURN 65 65 void Parrot_exit(Parrot_Interp, int status); 66 66 67 PARROT_EXPORT void Parrot_run_native(P arrot_Interp interp, native_func_t func);67 PARROT_EXPORT void Parrot_run_native(PARROT_INTERP, native_func_t func); 68 68 69 69 /* Parrot_set_config_hash exists in *_config.o (e.g install_config.o), 70 70 so if you make this call then you will need to link with it in -
include/parrot/interpreter.h
92 92 PARROT_CLONE_CC = 0x80, /* clone current continuation -- 93 93 * fork()-like cloning (requires 94 94 * cloned code segments); probably 95 * would only work if runloop_level is 1 96 */ 95 * would only work if runloop_level is 1 */ 97 96 98 97 /* combinations of flags */ 99 98 PARROT_CLONE_DEFAULT = 0x7f /* everything but CC */ … … 101 100 /* &end_gen */ 102 101 103 102 struct parrot_interp_t; 104 /* One of the most common shim arguments is the interpreter itself, so it105 * gets its own macro.106 */107 103 104 /* One of the most common shim arguments is the interpreter itself, so it 105 * gets its own macro. */ 108 106 #define PARROT_INTERP /*@notnull@*/ /*@in@*/ Parrot_Interp interp 109 107 #define NULLOK_INTERP /*@null@*/ /*@in@*/ Parrot_Interp interp 110 108 #define SHIM_INTERP /*@unused@*/ /*@null@*/ Parrot_Interp interp_unused __attribute__unused__ … … 151 149 Warnings_classes classes; 152 150 } *Warnings; 153 151 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) */ 158 154 159 155 typedef enum { 160 156 PARROT_PROF_DOD_p1, /* pass 1 mark root set */ … … 167 163 PARROT_PROF_EXTRA 168 164 } profile_extra_enum; 169 165 170 /* 171 * data[op_count] is time spent for exception handling 172 */ 166 /* data[op_count] is time spent for exception handling */ 173 167 typedef struct ProfData { 174 168 int op; 175 169 UINTVAL numcalls; … … 184 178 } RunProfile; 185 179 186 180 /* Forward declaration for imc_info_t -- the actual struct is 187 * defined in imcc/imc.h 188 */ 181 * defined in imcc/imc.h */ 189 182 struct _imc_info_t; 190 183 191 184 typedef union { … … 210 203 struct Parrot_Context *caller_ctx; /* caller context */ 211 204 Regs_ni bp; /* pointers to FLOATVAL & INTVAL */ 212 205 Regs_ps bp_ps; /* pointers to PMC & STR */ 206 213 207 /* end common header */ 214 208 INTVAL *n_regs_used; /* INSP in PBC points to Sub */ 215 209 size_t regs_mem_size; /* memory occupied by registers */ … … 223 217 UINTVAL errors; /* fatals that can be turned off */ 224 218 UINTVAL trace_flags; 225 219 UINTVAL recursion_depth; /* Sub call recursion depth */ 226 /* 227 * new call scheme and introspective variables 228 */ 220 221 /* new call scheme and introspective variables */ 229 222 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 */ 233 225 PMC *current_cont; /* the return continuation PMC */ 234 226 PMC *current_object; /* current object if a method call */ 235 227 opcode_t *current_pc; /* program counter of Sub invocation */ … … 240 232 PMC *handlers; /* local handlers for the context */ 241 233 /* deref the constants - we need it all the time */ 242 234 struct PackFile_Constant ** constants; 235 243 236 /* 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 */ 246 238 size_t pred_offset; 247 239 }; 248 240 … … 298 290 * used to resume execution at a point in the runloop where an exception 299 291 * handler can be run. Ultimately this information should be part of 300 292 * 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. */ 302 294 303 295 typedef struct parrot_runloop_t { 304 296 Parrot_jump_buff resume; /* jmp_buf */ … … 508 500 509 501 VAR_SCOPE native_func_t run_native; 510 502 511 typedef PMC *(*Parrot_compiler_func_t)(P arrot_Interp interp,503 typedef PMC *(*Parrot_compiler_func_t)(PARROT_INTERP, 512 504 const char * program); 513 505 514 506 /* HEADERIZER BEGIN: src/inter_create.c */ … … 957 949 /* interpreter.pmc */ 958 950 void clone_interpreter(Parrot_Interp dest, Parrot_Interp self, INTVAL flags); 959 951 960 void Parrot_setup_event_func_ptrs(P arrot_Interp interp);952 void Parrot_setup_event_func_ptrs(PARROT_INTERP); 961 953 962 954 PARROT_EXPORT void disable_event_checking(PARROT_INTERP); 963 955 PARROT_EXPORT void enable_event_checking(PARROT_INTERP); … … 973 965 struct Parrot_Interp_; 974 966 typedef struct Parrot_Interp_ *Parrot_Interp; 975 967 976 typedef void * *(*native_func_t)(P arrot_Interp interp,968 typedef void * *(*native_func_t)(PARROT_INTERP, 977 969 void *cur_opcode, 978 970 void *start_code); 979 971 -
languages/dotnet/ops/dotnet.ops
83 83 84 84 85 85 /* Overflow exception thrower. */ 86 static opcode_t* dotnet_OverflowException(P arrot_Interp interp, opcode_t *ret)86 static opcode_t* dotnet_OverflowException(PARROT_INTERP, opcode_t *ret) 87 87 { 88 88 PMC *ex_pmc = pmc_new(interp, enum_class_Exception); 89 89 VTABLE_set_string_native(interp, ex_pmc, -
src/parrot_debugger.c
115 115 #include "parrot/debugger.h" 116 116 117 117 static void PDB_printwelcome(void); 118 static void PDB_run_code(P arrot_Interp interp, int argc, char *argv[]);118 static void PDB_run_code(PARROT_INTERP, int argc, char *argv[]); 119 119 120 120 /* 121 121 … … 249 249 */ 250 250 251 251 static void 252 PDB_run_code(P arrot_Interp interp, int argc, char *argv[])252 PDB_run_code(PARROT_INTERP, int argc, char *argv[]) 253 253 { 254 254 new_runloop_jump_point(interp); 255 255 if (setjmp(interp->current_runloop->resume)) { -
src/pbc_disassemble.c
82 82 83 83 /* 84 84 85 =item C<static void do_dis(P arrot_Interp interp)>85 =item C<static void do_dis(PARROT_INTERP)> 86 86 87 87 Do the disassembling. 88 88 … … 91 91 */ 92 92 93 93 static void 94 do_dis(P arrot_Interp interp)94 do_dis(PARROT_INTERP) 95 95 { 96 96 Parrot_disassemble(interp); 97 97 } -
src/pmc/parrotinterpreter.pmc
170 170 } 171 171 172 172 static int 173 recursion_limit(P arrot_Interp interp, PMC *self, int l)173 recursion_limit(PARROT_INTERP, PMC *self, int l) 174 174 { 175 175 const int ret = interp->recursion_limit; 176 176 interp->recursion_limit = l; -
t/src/basic.t
6 6 use warnings; 7 7 use lib qw( . lib ../lib ../../lib ); 8 8 use Test::More; 9 use Parrot::Test ;9 use Parrot::Test tests => 3; 10 10 11 plan tests => 3;12 13 11 =head1 NAME 14 12 15 13 t/src/basic.t - Basics -
t/src/compiler.t
6 6 use warnings; 7 7 use lib qw( . lib ../lib ../../lib ); 8 8 use Test::More; 9 use Parrot::Test ;9 use Parrot::Test tests => 5; 10 10 11 $^O eq 'MSWin32'12 ? plan( skip_all => 'linking problem' )13 : plan( tests => 5 );14 15 11 =head1 NAME 16 12 17 13 t/src/compiler.t - Compile and run a PIR program from C. … … 35 31 #include "parrot/extend.h" 36 32 37 33 static opcode_t * 38 run(P arrot_Interp interp, int argc, char *argv[])34 run(PARROT_INTERP, int argc, char *argv[]) 39 35 { 40 36 const char *c_src = ".sub main :main\n" " print \"ok\\n\"\n" ".end\n"; 41 37 … … 117 113 #include "parrot/extend.h" 118 114 119 115 static void 120 compile_run(P arrot_Interp interp, const char *src, STRING *type, int argc,116 compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 121 117 char *argv[]) 122 118 { 123 119 STRING *smain; … … 150 146 } 151 147 152 148 static opcode_t * 153 run(P arrot_Interp interp, int argc, char *argv[])149 run(PARROT_INTERP, int argc, char *argv[]) 154 150 { 155 151 const char *c_src = ".sub main :main\n" " print \"ok\\n\"\n" ".end\n"; 156 152 … … 210 206 #include "parrot/extend.h" 211 207 212 208 static void 213 compile_run(P arrot_Interp interp, const char *src, STRING *type, int argc,209 compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 214 210 char *argv[]) 215 211 { 216 212 STRING *smain; … … 243 239 } 244 240 245 241 static opcode_t * 246 run(P arrot_Interp interp, int argc, char *argv[])242 run(PARROT_INTERP, int argc, char *argv[]) 247 243 { 248 244 const char *c_src = ".sub main :main\n" " print ok\\n\"\n" ".end\n"; 249 245 … … 303 299 #include "parrot/extend.h" 304 300 305 301 static void 306 compile_run(P arrot_Interp interp, const char *src, STRING *type, int argc,302 compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 307 303 char *argv[]) 308 304 { 309 305 STRING *smain; … … 336 332 } 337 333 338 334 static opcode_t * 339 run(P arrot_Interp interp, int argc, char *argv[])335 run(PARROT_INTERP, int argc, char *argv[]) 340 336 { 341 337 const char *c_src = ".sub main :main\n" " print ok\\n\"\n" ".end\n"; 342 338 … … 395 391 #include "parrot/extend.h" 396 392 397 393 static void 398 compile_run(P arrot_Interp interp, const char *src, STRING *type, int argc,394 compile_run(PARROT_INTERP, const char *src, STRING *type, int argc, 399 395 char *argv[]) 400 396 { 401 397 STRING *smain; … … 428 424 } 429 425 430 426 static opcode_t * 431 run(P arrot_Interp interp, int argc, char *argv[])427 run(PARROT_INTERP, int argc, char *argv[]) 432 428 { 433 429 const char *c_src = ".sub main :main\n" " print ok\\n\"\n" ".end\n"; 434 430 -
t/src/exit.t
6 6 use warnings; 7 7 use lib qw( . lib ../lib ../../lib ); 8 8 use Test::More; 9 use Parrot::Test ;9 use Parrot::Test tests => 1; 10 10 11 plan tests => 1;12 13 11 =head1 NAME 14 12 15 13 t/src/exit.t - Exiting … … 30 28 #include <parrot/embed.h> 31 29 32 30 void 33 ex1(P arrot_Interp interp, int x, void*p)31 ex1(PARROT_INTERP, int x, void*p) 34 32 { 35 33 printf("ex1\n"); 36 34 } 37 35 38 36 void 39 ex2(P arrot_Interp interp, int x, void*p)37 ex2(PARROT_INTERP, int x, void*p) 40 38 { 41 39 printf("ex2\n"); 42 40 } 43 41 44 42 void 45 ex3(P arrot_Interp interp, int x, void*p)43 ex3(PARROT_INTERP, int x, void*p) 46 44 { 47 45 Parrot_io_printf(interp, "ex3\n"); 48 46 } -
t/src/extend.t
184 184 #include "parrot/extend.h" 185 185 186 186 static opcode_t* 187 the_test(P arrot_Interp interp, opcode_t *cur_op, opcode_t *start)187 the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 188 188 { 189 189 Parrot_Int type = Parrot_PMC_typenum(interp, "ResizablePMCArray"); 190 190 Parrot_PMC array = Parrot_PMC_new(interp, type); … … 438 438 * so that buffering in PIO is not an issue */ 439 439 440 440 static opcode_t* 441 the_test(P arrot_Interp interp, opcode_t *cur_op, opcode_t *start)441 the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 442 442 { 443 443 PackFile *pf = Parrot_readbc(interp, "$temp_pbc"); 444 444 STRING *name = const_string(interp, "_sub1"); … … 512 512 * so that buffering in PIO is not an issue */ 513 513 514 514 static opcode_t* 515 the_test(P arrot_Interp interp, opcode_t *cur_op, opcode_t *start)515 the_test(PARROT_INTERP, opcode_t *cur_op, opcode_t *start) 516 516 { 517 517 PackFile *pf = Parrot_readbc(interp, "$temp_pbc"); 518 518 STRING *name = const_string(interp, "_sub1"); … … 709 709 */ 710 710 void interp_cleanup(Parrot_Interp, int); 711 711 712 void interp_cleanup(P arrot_Interp interp, int status)712 void interp_cleanup(PARROT_INTERP, int status) 713 713 { 714 714 handler_node_t *node = interp->exit_handler_list; 715 715