A warning:
By having a deeper look at the core testsuite (t/testcore.t and the new testcore branch) I found issue 141,
static strings like "1" converted to numbers as will always lead to 0, because all perl versions earlier
than 5.17.6 checked the SvLEN of the string, and with -fcog and -O3 such strings were static, hence SvLEN=0.
Father fixed this with cd84013aab030da47b76a44fb3
So use -O2 with B::C instead until release 1.43 is out.
B::CC needs to be used with -fno-cog. B::Bytecode is not affected.
I need to abstract our super-complicated string handling, it's getting messy.
objects: PV, PVIV, PVNV, PVLV, PVMG, PVBM
with features: shared hek, IsCOW, READONLY, ("" or "0" or $] > 5.17.5), -fcog, -fconst-strings
BTW: The new core IsCOW feature cannot unfortunately not be used yet.
It fixes most READONLY cases, but they store a COWREFCNT byte at the
end of the string buffer, so you cannot use those strings as static constants.
Such a COWREFCNT field needs to have its own
field of course, for cow strings usage in the compiler, embedded and in threads.
For threads it even needs to be word sized to be able to CAS it.