On 3/28/07, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
1) This ism't needed, these pointers are only valid and needed up to the next sub call/return.
The current_results member already lives in Parrot_Context; this patch just moves the rest of them there as well. Variables can't be global simply because of when they're valid. It's a hack.
2) The Context struct should be as small as possible because each sub call needs one.
Compactness does not supersede good design.
3) Reentrancy isn't a problem as new threads get new interpreter structs anyway.
Reentrancy isn't only a threading issue. From src/inter_run.c, in Parrot_runops_fromc_args_event (line 318): /* running code from event handlers isn't fully reentrant due to * these interpreter variables - mainly related to calls */ The code then has to manually save these variables, then restore them after the PIR sub is called. Thus, reentrancy *is* a problem. With this patch, the number of variables we have to do this with is reduced to one. Thanks, Alek