Argh. Just realised my old address, [EMAIL PROTECTED], could receive emails but not send them (not even to itself!)
> > On Dec 31, 2005, at 15:43, Amos Robinson wrote: > -- > > A copy_ins() function would be nice, if needed. > >> However, this doesn't seem to work with e.g. set_args. > > Why? In my local repo with branch_cond_loop optimizations, parrot -v -dFFFF runtime/parrot/library/Data/Dumper/Default.pir gives me... -- SNIP -- push %s, %s push push %s, %s push sprintf %s, %s, %s sprintf set %s, %s[%s] set error:imcc:The opcode '_' (<1>) was not found. Check the type and number of the arguments in file 'runtime/parrot/library/Data/Dumper/Default.pir' line 342 The op after the set is a method call: self."dump"(...). If I change it to say, a label (that is being used), it works fine. I can get it working for now by checking that it's not gonna move any PCC directives - at the moment it just doesn't like any sort of branches. > -- > > Duplicating e.g. a function call needs a bit more effort, e.g. > allocation and filling the pcc_sub structure. > Hmm, okay. I was hoping I could've just copied the set_args, get_results, and callmethodccs. I'll have a look further into the PCC stuff you did. -- > > The in/out doesn't tell you if a PMC is modified like in 'pop' but tells you if the register is unmodified (in) or has a new contents after the operation (out). E.g. > > pop P0, P1 # (out, in) > > doesn't modify P1 (it is a pointer to the same location before and after the operation - if the contents of the array changes, doesn't matter at all). But P0 has a total new value after the operation, namely a pointer to the previously last value of P1. > > This information is needed for register allocation inside imcc itself and in the JIT. The 'out' means that the life range of the old 'P0' ends at that instruction and a new life range of 'P0' is starting. > Ahh, okay. How many ops would you say there are that change contents of non-LHS args? I don't want to cause too much trouble, but for used_once I think some way of checking whether it's one of those is necessary, even if I just hard-code the checks. >> Amos Robinson > > leo