develooper Front page | perl.perl5.porters | Postings from November 2014

[perl #123105] [PATCH 0/4] RFC op-type patchset

Thread Previous
Jim Cromie
November 2, 2014 21:02
[perl #123105] [PATCH 0/4] RFC op-type patchset
Message ID:
# New Ticket Created by  Jim Cromie 
# Please include the string:  [perl #123105]
# in the subject line of all future correspondence about this issue. 
# <URL: >

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).

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About