| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
VM/ESA was a mainframe OS. IBM ended service on it in June 2003. It was
superseded by Z/VM.
|
|
|
|
|
|
|
| |
See RT #114198. DynaLoader was warning about somewhat dubious use of
RETVAL with a CODE section but without an OUTPUT section. This fixes
that problem, but I have obviously not been able to test on all affected
operating systems.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 6ea72b3a1, rv2hv and padhv have had the ability to return boo-
leans in scalar context, instead of bucket stats, if flagged the right
way. sub { %hash || ... } is optimised to take advantage of this. If
the || is in unknown context at compile time, the %hash is flagged as
being maybe a true boolean. When flagged that way, it returns a bool-
ean if block_gimme() returns G_VOID.
If rv2hv and padhv can already do this, then we don’t need the
boolkeys op any more. We can just flag the rv2hv to return a boolean.
In all the cases where boolkeys was used, we know at compile time that
it is true boolean context, so we add a new flag for that.
|
|
|
|
|
|
|
|
|
|
| |
This will be used for things need to handle inversion lists in the three
files that currently use them. I'm putting this in a separate hdr,
because inversion lists are very internal-only, so should not be grouped
in with things that there is an external API for. It is a dot-c file so
that the functions can continue to be declared with embed.fnc, and
porting/args_assert.t will continue to work, as it looks only in .c
files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In %hash || $foo, the %hash is in scalar context, so it has to iterate
through the buckets to produce statistics on bucket usage.
If the || is in void context, the value returned by hash is only ever
used as a boolean (as || doesn’t have to return it). We already opti-
mise it by adding a boolkeys op when it is known at compile time that
|| will be in void context.
In sub { %hash || $foo } it is not known at compile time that it will
be in void context, so it wasn’t optimised.
This commit optimises it by flagging the %hash at compile time as
being possibly in ‘true boolean’ context. When that flag is set,
the rv2hv and padhv ops call block_gimme() to see whether || is in
void context.
This speeds things up signficantly. Here is what I got after optimis-
ing rv2hv but before doing padhv:
$ time ./miniperl -e '%hash = 1..10000; sub { %hash || 1 }->() for 1..100000'
real 0m0.179s
user 0m0.101s
sys 0m0.005s
$ time ./miniperl -e 'my %hash = 1..10000; sub { %hash || 1 }->() for 1..100000'
real 0m5.446s
user 0m2.419s
sys 0m0.015s
(That example is slightly misleading because of the closure, but the
closure version takes 1 sec. when optimised.)
|
|
|
|
| |
This was leaving detritus on Win32 builds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After a while, I realised that it can be confusing for PAD_ARRAY and
PAD_MAX to take a pad argument, but for PAD_SV to take a number and
PAD_SET_CUR a padlist.
I was copying the HEK_KEY convention, which was probably a bad idea.
This is what we use elsewhere:
TypeMACRO
----=====
AvMAX
CopFILE
PmopSTASH
StashHANDLER
OpslabREFCNT_dec
Furthermore, heks are not part of the API, so what convention they use
is not so important.
So these:
PADNAMELIST_*
PADLIST_*
PADNAME_*
PAD_*
are now:
Padnamelist*
Padlist*
Padname*
Pad*
|
|
|
|
|
| |
Commit c9795579db61c900bacee2790bdceb7bad3dd45d introduced
an error in C++: it's missing a cast.
|
|
|
|
|
| |
I broke it, but Karl Williamson’s commit (the previous) with my tweaks
fixes it. This function was not at all exercised by the test suite.
|
|
|
|
|
|
|
|
|
|
| |
Commit 86b9d29366aea0e71ad75b61d04f56f1fe5b0d4d created a new PADLIST
type. However, this broke the compilation of Devel::Peek with C++.
This commit gets it to compile again, and pass our regression test
suite.
[Modified by the committer to use the correct PADLIST_ macros; other-
wise it will crash.]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we are making padlists their own type, and no longer AVs, it makes
sense to add APIs for pads, too, so that CPAN code that needs to
change now will only have to change once if we ever stop pads them-
selves from being AVs.
There is no reason pad names have to be SVs, so I am adding sep-
arate APIs for pad names, too. The AV containing pad names is
now officially a PADNAMELIST, which is accessed, not via
*PADLIST_ARRAY(padlist), but via PADLIST_NAMES(padlist).
Future optimisations may even merge the padlist with its name list so
I have also added macros to access the parts of the name list directly
from the padlist.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to fix a bug, I need to add new fields to padlists. But I
cannot easily do that as long as they are AVs.
So I have created a new padlist struct.
This not only allows me to extend the padlist struct with new members
as necessary, but also saves memory, as we now have a three-pointer
struct where before we had a whole SV head (3-4 pointers) + XPVAV (5
pointers).
This will unfortunately break half of CPAN, but the pad API docs
clearly say this:
NOTE: this function is experimental and may change or be
removed without notice.
This would have broken B::Debug, but a patch sent upstream has already
been integrated into blead with commit 9d2d23d981.
|
|
|
|
|
|
|
|
|
|
|
| |
It had been using one called simply C<cv> but that name is already
taken in the (opaque) argument list generated by the XS_EUPXS
wrapper around the function name. And that cv is actually used
by boilerplate code generated from PPCODE, but only when there is
an ALIAS section present, which there wasn't before c0810f8ef84,
but now is.
So declare and use our own CV and leave the one passed in alone.
|
|
|
|
|
|
| |
UTS was a mainframe version of System V created by Amdahl, subsequently sold
to UTS Global. The port has not been touched since before 5.8.0, and UTS
Global is now defunct.
|
| |
|
|
|
|
|
|
| |
newCONSTSUB() and newCONSTSUB_flags() take ownership of (one reference to)
the passed-in SV. As the XS wrapper is passing in a SV taken from the stack,
it needs to up the reference count by one in order to avoid later bugs.
|
|
|
|
|
|
|
|
|
|
| |
Previously both C routines were wrapped with newCONSTSUB_type, which used a
"type" parameter to determine which C code to call. Use an ALIAS to bind the
code to two names, and eliminate the "type" parameter.
This makes the test code clearer. It's not perfect, as the XS wrapper
XS::APItest::newCONSTSUB has a flags parameter whereas the underlying C code
does not, but fixing this would require considerably more XS hackery.
|
|
|
|
| |
The .c file was changed by 2e94d7323a.
|
|
|
|
|
| |
This has clarifications, grammar changes, and reflowing to fit into 79
columns
|
| |
|
|
|
|
|
|
| |
One was made unnecessary by 35f7559499. The other was added by
35f7559499 and never used. I forgot to clean up once I had things
working.
|
|
|
|
|
| |
This fixes "Format not terminated at -e line 2, at end of line" errors
on Windows (at least) coming from the new tests added by commit 35f7559499.
|
| |
|
| |
|
|
|
|
| |
It was only working when B::Concise was passed a code ref.
|
| |
|
| |
|
|
|
|
|
| |
Instead of lengthening the struct, we can reuse SvCUR, which is cur-
rently unused.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are only used for storing a string and an IV.
Making them into full-blown SVt_PVFMs is overkill.
FmLINES was only being used on these three scalars. So make it use
the SvIVX field. struct xpvfm no longer needs an xfm_lines member,
because SVt_PVFMs no longer use it.
This also causes a TODO test in taint.t to start passing, but I do
not fully understand why. But at least that’s progress. :-)
|
|
|
|
|
| |
Win32CORE is already ithreads aware, but was still making
Perl_get_context calls. This fixes that. Smaller machine code is the result.
|
|
|
|
|
|
|
|
|
| |
The fact that the call checker is stored in magic is an implementation
detail. cv_undef does not free magic, so the call checker lives on.
If we were to move the parameter prototype into magic internally, we
would not want undef to stop clearing it. To me, the current situa-
tion with call checkers is similar.
|
|
|
|
|
| |
Things like /[s]/ or /[s]/i can be optimized as if they did not have the
brackets, /s/ or /s/i.
|
| |
|
|
|
|
| |
Previously only those matching qr/GVf_IMPORTED/ were exposed.
|
|
|
|
|
|
| |
Previously most were exposed as constants, but often B was not taught about
flags added to cv.h. Determining the flags by parsing cv.h also permits the
removal of various version-specific logic from the Makefile.PL
|
|
|
|
| |
Previously only a subset were exposed as constants.
|
|
|
|
|
|
| |
It doesn't actually matter which order the files are scanned for constants,
but it's neater and slightly clearer where to add new files if there is an
obvious order.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This warning was being generated inappropriately during some internal
operations, such as parsing a program; spotted by Tom Christiansen.
The solution is to move the check for this situation out of the common
code, and into the code where just \p{} and \P{} are handled.
As mentioned in the commit's perldelta, there remains a bug
[perl #114148], where no warning gets generated when it should
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In restore_magic(), which is called after any magic processing, all of
the public OK flags have been shifted into the private OK flags. Thus
the lack of an appropriate public OK flags was used to trigger both get
magic and required conversions. This scheme did not cover ROK, however,
so all properly written code had to make sure mg_get was called the right
number of times anyway. Meanwhile the private OK flags gained a second
purpose of marking converted but non-authoritative values (e.g. the IV
conversion of an NV), and the inadequate flag shift mechanic broke this
in some cases.
This patch removes the shift mechanic for magic flags, thus exposing (and
fixing) some improper usage of magic SVs in which mg_get() was not called
correctly. It also has the side effect of making magic get functions
specifically set their SVs to undef if that is desired, as the new behavior
of empty get functions is to leave the value unchanged. This is a feature,
as now get magic that does not modify its value, e.g. tainting, does not
have to be special cased.
The changes to cpan/ here are only temporary, for development only, to
keep blead working until upstream applies them (or something like them).
Thanks to Rik and Father C for review input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Back in perl 5.000, ck_grep would call ck_sort (which was still the
case until 354dd559d99 just recently) and the latter would traverse
its way through the op_next pointers to find an op that tried to
escape the block, setting its op_next pointer to null. Then ck_grep
would traverse op_next pointers itself to find the place where ck_sort
stopped. That caused problems for grep which were fixed in 748a93069b
(perl 5.001). It was fixed by setting op_next to 0 on the first op,
so that the loop in ck_grep would not do anything. But that loop was
left there. This commit removes it.
There are also a couple of things I missed when disentangling
ck_grep and ck_sort in commit /354dd559d9. I accidentally put
if (o->op_flags & OPf_STACKED) inside if (o->op_flags & OPf_STACKED).
And the OPf_SPECIAL flag was only being set for sort’s use, so ck_grep
doesn’t need to copy that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the peephole optimiser encounters a __SUB__, it looks to see
whether the current sub is clonable. If it is not, it inlines the
__SUB__ as a const op.
This works most of the time. A forward declaration will cause the sub
definition to reuse the existing stub. When that happens, the sub
visible during compilation in PL_compcv is not the sub that the
op tree will finally be attached to. But the peephole optimiser
is called after that, with PL_compcv set to the other CV (what
was a stub).
ck_sort was calling the peephole optimiser on the sort block ahead of
time. So this caused __SUB__ to point to the wrong subroutine.
By removing the CALL_PEEP call from ck_sort and adding logic to the
peephole optimiser itself to traverse the sort block (it is not in the
usual op_next chain), this bug is eliminated.
I modified the DEFER macro to work as a single statement. You don’t
want to know how much time I spent debugging the bus errors that were
occurring because if(foo) DEFER; didn’t do what I though.
It turns out that grepstart and mapstart, which also use ck_sort,
had their blocks go through the peephole optimiser twice, because
grepwhile already has special-casing in the peephole optimiser.
This also has the side-effect of making map and grep slightly more
efficient, in that they no longer execute a scope op (which is just
pp_null). By temporarily disconnecting the subtree before running the
optimiser, ck_sort was hiding a possible optimisation (skipping the
scope op).
|
|
|
|
|
| |
--lipods warns, and I don't think it is needed in this test,
so I have removed it
|