Branch: refs/heads/zefram/cmpchain
Home: https://github.com/Perl/perl5
Commit: 90d3bbafc48182ff03125e27cc02a29e28c7e82b
https://github.com/Perl/perl5/commit/90d3bbafc48182ff03125e27cc02a29e28c7e82b
Author: Zefram <[email protected]>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M MANIFEST
M embed.fnc
M embed.h
M ext/Opcode/Opcode.pm
M lib/B/Deparse.pm
M lib/B/Deparse.t
M lib/B/Op_private.pm
M op.c
M opcode.h
M opnames.h
M perly.act
M perly.h
M perly.tab
M perly.y
M pod/perlop.pod
M pp.c
M pp_proto.h
M proto.h
M regen/opcodes
A t/op/cmpchain.t
M toke.c
Log Message:
-----------
chained comparisons
Commit: 219d15c143703b682a428397af2f6b7c3401f310
https://github.com/Perl/perl5/commit/219d15c143703b682a428397af2f6b7c3401f310
Author: Zefram <[email protected]>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M pod/perlop.pod
Log Message:
-----------
pod/perlop.pod: expand doc on chained comparisons
Commit: 214d8488d1597b08115fe056a91f067014df3c63
https://github.com/Perl/perl5/commit/214d8488d1597b08115fe056a91f067014df3c63
Author: Zefram <[email protected]>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M pod/perlop.pod
Log Message:
-----------
pod/perlop.pod: cross-precedence chaining
Warn explicitly that chainable operators don't chain with operators of
different precedence.
Commit: e64cfa3c67ac7a1f97f7fa74bc4e00df2c868bb6
https://github.com/Perl/perl5/commit/e64cfa3c67ac7a1f97f7fa74bc4e00df2c868bb6
Author: Yves Orton <[email protected]>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M embed.fnc
M op.c
M proto.h
Log Message:
-----------
op.c: change Optype to I32 for cmpchain functions
Optype appears to be almost completely unused, and on Win32 builds
we saw strange build errors after applying the cmpchain patches.
The only relevant changes were in perly.y
perly.y(1063) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1065) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1079) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
perly.y(1081) : warning C4244: 'function' : conversion from 'I32' to
'Optype', possible loss of data
Reviewing the code I noticed that functions like Perl_newBINOP() have
an I32 type argument, and functions like OpTYPE_set() coerce such
arguments into type OPCODE:
#define OpTYPE_set(o,type) \
STMT_START { \
o->op_type = (OPCODE)type; \
o->op_ppaddr = PL_ppaddr[type]; \
} STMT_END
this patch changes the signature to the new cmpchain functions so that
they do they same, and added OPCODE casts to places that set o->op_type
Compare: https://github.com/Perl/perl5/compare/c741e12cc05a...e64cfa3c67ac