Test that the line number for a "sub redefined" warning is for the start.

The Perl interpreter is careful to use the line number of the start of a
subroutine's redefinition for the warning, but there were no tests for this.
Test that the warning for "Found = in conditional" is for the start line.

The Perl interpreter is careful to use the line number of the start of
the "Found = in conditional", but there were no tests for this.
Test that the warning for "can be 0, test with defined" is for the start.

The Perl interpreter is careful to use the line number of the start of
the 'Value of %s can be "0"; test with defined()" warning, but there were no
tests for this.
newXS_len_flags() shouldn't change the line number on PL_curcop when warning.

This can actually generate incorrect line numbers in runtime warnings, when
XSUBs are redefined from calls made from BEGIN blocks, and the line number
from the opening brace of the begin block is mashed with the filename of the
current line. For compiletime warnings, PL_curcop == &PL_compiling, so the
line numbers will be correct whether taken from PL_compiling or PL_parser.

This code dates back to perl-5.000, when it was added to newXS(). It appears
to be a copy of code present in newSUB() since alpha 2.
Upgrade to XSLoader 0.16
Make XSLoader's UPSTREAM as undef

The upstream is supposed to be "blead", but the CPAN version of
XSLoader 0.16 and the one that has shipped with perl 5.17.3 are
different (doc changes only). The problem (cmp_version.t failing)
should disappear after the next perl release.
Make dual-lived constant.pm work on 5.8 again

Before releasing the version of constant.pm from bleadperl to the CPAN,
I tested it with the versions of Perl I have by hand, and it appears
that the current code fails to compile on 5.8:

  Bareword "_DOWNGRADE" not allowed while "strict subs" in use at
  lib/constant.pm line 142.

Added by bd8cb5529605f33aa9cf95d6c471386b3a0e015d

Removing the short-circuit return allows the code to compile and the
tests to pass on all stable Perl from 5.8.2 to 5.16.1.
Under -DPERL_DEBUG_READONLY_OPS don't work around glibc 2.2.5 _moddi3 bugs.

The work around involves a runtime check and substituting OP pointers based
on the result. The substitution fails if the optree is mapped read-only.
With -DPERL_DEBUG_READONLY_OPS, changing a slab refcnt shouldn't make it r/w.

Perl_op_refcnt_inc() and Perl_op_refcnt_dec() now both take care to leave the
slab in the same state as they found it. Previously both would
unconditionally make the slab read-write.
In op.c, change S_Slab_to_rw() from an OP * parameter to an OPSLAB *.

This makes it consistent with Perl_Slab_to_ro(), which takes an OPSLAB *.
Perl_magic_setdbline() should clear and set read-only OP slabs.

The debugger implements breakpoints by setting/clearing OPf_SPECIAL on
OP_DBSTATE ops. This means that it is writing to the optree at runtime,
and it falls foul of the enforced read-only OP slabs when debugging with
-DPERL_DEBUG_READONLY_OPS

Avoid this by removing static from Slab_to_rw(), and using it and Slab_to_ro()
in Perl_magic_setdbline() to temporarily make the slab re-write whilst
changing the breakpoint flag.

With this all tests pass with -DPERL_DEBUG_READONLY_OPS (on this system)
In Perl_cv_forget_slab(), simplify the conditionally compiled code.

This refactoring reduces the line count and makes it clear that the basic
logic is the same with or without -DPERL_DEBUG_READONLY_OPS. It make no
change to the generated assembler on a normal build.
Merge improvements to -DPERL_DEBUG_READONLY_OPS into blead.

All tests pass with -Dusethreads -DPERL_DEBUG_READONLY_OPS (on this system)
Document the reason for the early return in Perl_newPROG() for OP_STUB.