From: David Mitchell Date: Mon, 16 May 2016 12:38:21 +0000 (+0100) Subject: get su_init/su_pop working under 5.23.8 X-Git-Tag: rt112246^2~15 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ded730eb90d077625077fa059f47ef321f9c42d1;hp=ded730eb90d077625077fa059f47ef321f9c42d1;p=perl%2Fmodules%2FScope-Upper.git get su_init/su_pop working under 5.23.8 In 5.23.8 there are two big differences to the way perl's context system manipulates the savestack. Firstly, pushing a scope no longer does one or two ENTER's instead the old value of PL_savestack_ix is stored as cx->blk_oldsaveix. This means that the boundaries of savestack frames are now not only specified as scopestack entries, but also as blk_oldsaveix entries. Secondly, most values that need restoring are saved in new fields in the CX structure rather than being pushed on the savestack; this means that it is quite likely that two nested scopes can share the same savestack index. This commit gets all the test scripts working that mainly test the savestack manipulation code (su_init and su_pop). It does this by: *) allowing the offset by which a savestack frame boundary is adjusted to be variable (rather than always SU_SAVE_DESTRUCTOR_SIZE), and by turning the origin array into an array of structs, one field of which is the offset for that depth. This allows multiple empty savestack frames to all trigger, by ensuring that each adjusted boundary is higher than the previous. *) padding the savestack using SAVEt_ALLOC, which allows a variable-sized chunk of savestack to be reserved, with minimal overhead during scope exit. In addition, *) the various SU_SAVE_AELEM_SIZE type macros have been rationalised and better commented; *) debugging output for su_init and su_pop has been improved *) the names of context types (for debugging) have been updated for 5.23.8 and some errors fixes for older perl versions ---