op.c: Correct comment added by c427f4d2d
op.c: cmmoent typo
perldiag: Correct ‘Can't use %s for loop variable’

It is no longer true that the variable can only be a simple scalar.
More to the point, this message should never be reached.  If you try
to use something prohibited as your loop variable, you get a syntax
error or ‘Missing $’.
readd noreturn and silence "noreturn that returns" warning on MSVC

Based on commit 73758d77 (by me), in commit 117af67d629 more things got
noreturn removed on MSVC. See also ML post
"(Hugmeir) Re: [perl.git] branch blead, updated. v5.21.0-377-gdc3bf40"
This caused a measurable increase in machine code size in 117af67d629 .
In commit 73758d77 , the reason there was no increase is
Perl_magic_regdatum_set is called only through a magic vtable. Optimizing
this to noreturn is forbidden unless the struct member type specifies it
(and it obviously doesn't, since this is the magic vtable).

The other not-noreturn on MSVC function, Perl_screaminstr, has no core
usage (its only reference is in the export table) or CPAN grep usage so
therefore it is being removed. It was made fatal in commit 9e3f0d16db .

before .text section of perl521.dll on VC 2003 32b, 0xc66a3 bytes, after
0xc6453
misc optimizing in DynaLoader

dl_last_error is "#define dl_last_error	(SvPVX(MY_CXT.x_dl_last_error))"
since the data is already in a SV *, use newSVsv instead of turning it into
a strlen-ed (eventually) char *.

-win32 dl_load_file never uses flags, so don't do a SvIV in void context
- dl_load_file cant use "flags=NULL" because of test
"calling DynaLoader::dl_load_file() with no argument" in DynaLoader.t
-OS_Error_String stop repeatedly computing address into MY_CXT and
 derefing after PerlProc_GetOSError

function sizes in machine code bytes on VC 2003
b4 0x69 OS_Error_String af 0x67
b4 0x9D _XS_DynaLoader_dl_error af 0x6B
b4 0x108 _XS_DynaLoader_dl_load_file af 0xD6
tweak PERL_TRACE_OPS for usability, use it.

Currently with -DPERL_TRACE_OPS builds, a table of OP dispatches per
optype is always printed in perl_destruct().  Since this also affects
miniperl, it makes both make & make test exceedingly noisy, and might
interfere with passing make test (I never waited til completion).

Although such builds arent meant for production, we can still make
them more usable; gate the printing with PL_debug to make it quiet by
default (-Dq -Dv -D0 options will all enable it).  Also dont print 0
values, which dramatically reduces output for simple one-liner
scripts.

So, patch does following:

interpvar.h: add PL_op_histo[PERL_TRACE_OPS_EXT] to create a 2nd set
of experimental/scratchpad counters (default size 48)

perl.c:perl_destruct: check PL_debug before printing PL_op_exec_cnt[]
and PL_op_histo[] counts, and skip printing 0 values in both.
PL_op_histo[] counts with "extra.%d" (vs OP_NAME with op_exec_cnt).
Also precede printed lines with "#:" to make it play nice with TAP and
to convey a JSON-ish name-value pair, and surround them with "#{" and
"#}" to envelop the results.

Define 2 macros; PERL_TRACE_OPS_INC, PERL_TRACE_OPS_HIT, to hide the
current #ifdeffery around counting uses.  Use them to show the
distribution of most of the OP->op_*flags* in exectuted-ops, and some
logical relations amongst them.

 - op-execs per optype
   (legacy example, now commented out to focus on ops-flags below)
 - total op-execs (OP_max+1, displays as CONSTRUCT)

 - ops w/wo op_opt		(extra 0,1)
 - ops w/wo op_slabbed		(extra 2,3)
 - ops w/wo op_static		(extra 4,5)
 - ops w/wo op_savefree		(extra 6,7)
 - ops w/wo op_folded		(extra 8,9)
 - ops w/wo op_folded		(extra 10,11)

 - ops w/wo (PL_op->op_ppaddr == PL_ppaddr[PL_op->op_type])	(extra 12,13)
   ie the postcondition cited in 10884df967

 - ops w &&,||,== relops between op_opt, op_slabbed		(extra 14-19)
 - others included, more discovery needed.			(extra 20-27)

With this patch, we get (with manual indenting of commit msg):

$ ./perl -Ilib -Dv ext/arybase/t/splice.t
 1..23
 ok 1
 ...
 ok 23
 #{ Trace of all OPs executed:
 #:  freed: 114745
 #:  CONSTRUCT: 114745
 #:  extra.0: 547
 #:  extra.1: 114198
 #:  extra.2: 2
 #:  extra.3: 114743
 #:  extra.4: 114745
 #:  extra.6: 114689
 #:  extra.7: 56
 #:  extra.8: 113725
 #:  extra.9: 1020
 #:  extra.10: 62682
 #:  extra.11: 52063
 #:  extra.12: 13
 #:  extra.13: 114732
 #:  extra.14: 545
 #:  extra.15: 114200
 #:  extra.16: 547
 #:  extra.17: 114198
 #:  extra.18: 2
 #:  extra.19: 114743
 #:  extra.20: 2
 #:  extra.21: 114743
 #:  extra.22: 114689
 #:  extra.23: 56
 #:  extra.24: 113669
 #:  extra.25: 1076
 #:  extra.26: 63586
 #:  extra.27: 51159
 #}