On Mon, Dec 26, 2016 at 11:41:52PM +0100, demerphq wrote: > Ok, color me convinced. 30k lines of pp code sounds less like a > problem than all the XS code that does the same. Dealing with XS in the short term is fairly trivial. Have a flag on each XS CV indicating that it knows about a reference-counted stack. In pp_entersub(), when calling an XS sub that hasn't got that flag (which initially is all of them), Copy() the sub's args, so that there are two copies of all the sub's args on the stack - a reference-counted set which the XS sub doesn't know about, and a second set which aren't reference-counted, and the XS sub sees. On return, bump the reference count of the returned args, decrement the reference count of the passed args, then shuffle the returned args down the stack. > Do you have any insight on the other issues I mentioned? I haven't looked at it yet. Anything involving %^H makes my eyes glaze over. -- Modern art: "That's easy, I could have done that!" "Ah, but you didn't!"Thread Previous | Thread Next