From: David Mitchell Date: Sun, 4 Nov 2012 18:23:25 +0000 (+0000) Subject: simplify GIMME_V X-Git-Tag: upstream/5.20.0~4957 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe61507474beae24ce859f6a443854c17458e726;p=platform%2Fupstream%2Fperl.git simplify GIMME_V Since OPf_WANT_VOID == G_VOID etc, we can substantially simplify the OP_GIMME macro (which is what implements GIMME_V). This saves 588 bytes in the perl executable on my -O2 system. --- diff --git a/op.h b/op.h index 9182b4d..bf933e4 100644 --- a/op.h +++ b/op.h @@ -66,11 +66,9 @@ typedef PERL_BITFIELD16 Optype; then all the other bit-fields before/after it should change their types too to let VC pack them into the same 4 byte integer.*/ +/* for efficiency, requires OPf_WANT_VOID == G_VOID etc */ #define OP_GIMME(op,dfl) \ - (((op)->op_flags & OPf_WANT) == OPf_WANT_VOID ? G_VOID : \ - ((op)->op_flags & OPf_WANT) == OPf_WANT_SCALAR ? G_SCALAR : \ - ((op)->op_flags & OPf_WANT) == OPf_WANT_LIST ? G_ARRAY : \ - dfl) + (((op)->op_flags & OPf_WANT) ? ((op)->op_flags & OPf_WANT) : dfl) #define OP_GIMME_REVERSE(flags) ((flags) & G_WANT)