|CC:||Jim Cromie <jim.cromie [...] gmail.com>|
|Subject:||[PATCH 0/4] RFC op-type patchset|
|To:||perlbug [...] perl.org|
|From:||Jim Cromie <jim.cromie [...] gmail.com>|
|Date:||Sun, 2 Nov 2014 14:00:44 -0700|
This patchset cleans up op_type and op_ppaddr initialization, using CHANGE_TYPE macro, thus "promoting" its use as the "normal" way to do so. One of its goals is that explicitly setting o->op_ppaddr or o->op_type should indicate something special. Patch 1 uses CHANGE_TYPE in 49 callsites, ie "normal" init. Patch 2 removes pp_mapstart trickery, with 1 line in op.c Patch 3 reduces variation in OP_AELEMFAST setup. the de-optimization is infinitesimal, and fixed by compilers. Patch 4 folds pp_opaddr setup into S_alloc_LOGOP. Patch 5 adds single CHANGE_TYPE where inits were separated by code. TODO: CHANGE_TYPE would properly apply in a few more spots; perl.c could use it once, if it were hoisted into op.h. op.c could use it 2x, but for a macro/sequence-point issue with ++(o->op_type). Id lean toward a temp var in callers, rather than in macro. pp.c could use it after patching OP_I_MODULO, but its a kinda special case anyway (aside, its not clear why bugtest is in runtime).