| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Now that CvSTASH requires backreference bookkeeping, stop people from
directly assigning to it (by using CvSTASH() as an lvalue), and instead
force them to use CvSTASH_set().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New magic type PERL_MAGIC_checkcall attaches a function to a CV, which
will be called as the second half of the op checker for an entersub
op calling that CV. Default state, in the absence of this magic,
is to process the CV's prototype if it has one, or apply list context
to all the arguments if not. New API functions cv_get_call_checker()
and cv_set_call_checker() provide a clean interface to this facility,
hiding the internal use of magic.
Expose in the API the new functions rv2cv_op_cv(),
ck_entersub_args_list(), ck_entersub_args_proto(), and
ck_entersub_args_proto_or_list(), which are meaningful segments of
standard entersub op checking and are likely to be useful in plugged-in
call checker functions.
Expose new API function op_contextualize(), which is a public interface
to the internal scalar()/list()/scalarvoid() functions. This API is
likely to be required in most plugged-in call checker functions.
Incidentally add new function mg_free_type(), in the API, which will
remove magic of one type from an SV. (mg_free() removes all magic,
and there isn't anything else more selective.)
|
|
|
|
|
|
| |
Now that CvGV can sometimes be reference counted, stop people from directly
assigning to it (by using CvGV as an lvalue), and instead force them to use
CvGV_set()
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after the recent commit 803f274831f937654d48f8cf0468521cbf8f5dff,
the CvGV field is sometimes reference counted. Since it was intended that
the reference counting would happen only for anonymous CVs, the CVf_ANON
flag was co-opted to indicate whether RC was being used. This is not
entirely robust; for example, sub __ANON__ {} is a non-anon sub which
points to the same GV used by anon subs, which while itself doesn't
directly break things, shows that the potential for breakage is there.
So add a separate flag just to indicate the reference count status of the
CvGV field.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each CV usually has a pointer, CvGV(cv), back to the GV that corresponds
to the CV's name (or to *foo::__ANON__ for anon CVs). This pointer wasn't
reference counted, to avoid loops. This could leave it dangling if the GV
is deleted.
We fix this by:
For named subs, adding backref magic to the GV, so that when the GV is
freed, it can trigger processing the CV's CvGV field. This processing
consists of: if it looks like the freeing of the GV is about to trigger
freeing of the CV too, set it to NULL; otherwise make it point to
*foo::__ANON__ (and set CvAONON(cv)).
For anon subs, make CvGV a strong reference, i.e. increment the refcnt of
*foo::__ANON__. This doesn't cause a loop, since in this case the
__ANON__ glob doesn't point to the CV. This also avoids dangling pointers
if someone does an explicit 'delete $foo::{__ANON__}'.
Note that there was already some partial protection for CvGV with
commit f1c32fec87699aee2eeb638f44135f21217d2127. This worked by
anonymising any corresponding CV when freeing a stash or stash entry.
This had two drawbacks. First it didn't fix CVs that were anonmous or that
weren't currently pointed to by the GV (e.g. after local *foo), and
second, it caused *all* CVs to get anonymised during cleanup, even the
ones that would have been deleted shortly afterwards anyway. This commit
effectively removes that former commit, while reusing a bit of the
actual anonymising code.
|
|
|
|
|
| |
The removal of CVf_ASSERTION in 584420f022db5722 and CVf_LOCKED in
e95ab0c0d2aa1b35 left two gaps in the sequence of bits in use.
|
|
|
|
|
|
|
| |
Replaced with xcv_depth and xfm_lines respectively. Both structures might
benefit from some field re-ordering.
Update the descriptive comments in the definition of union _xivu.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
MUTABLE_PTR(), to validate that there is no casting away of const.
p4raw-id: //depot/perl@34610
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
| |
p4raw-id: //depot/perl@34167
|
|
|
|
|
|
| |
From: "Reini Urban" <rurban@x-ray.at>
Message-ID: <6910a60806080717h1aaaef1fh425a2ef21a62c9ed@mail.gmail.com>
p4raw-id: //depot/perl@34030
|
|
|
|
|
| |
Nullhek and Nullhv. Nullop is going to be a bit less simple.
p4raw-id: //depot/perl@33051
|
|
|
|
|
| |
Message-ID: <20071229181742.1933db40@r2d2>
p4raw-id: //depot/perl@32783
|
|
|
| |
p4raw-id: //depot/perl@31333
|
|
|
|
|
| |
earlier we missed in av.h and hv.h)
p4raw-id: //depot/perl@29670
|
|
|
| |
p4raw-id: //depot/perl@29665
|
|
|
|
|
| |
is part of the xnv union.
p4raw-id: //depot/perl@29634
|
|
|
|
|
|
| |
in the xnv union. This frees up IVX for the PL_generation code, which
in turn will allow SvCUR to return to its real purpose.
p4raw-id: //depot/perl@29630
|
|
|
|
|
| |
Message-ID: <20061019120412.GA12290@the.earth.li>
p4raw-id: //depot/perl@29053
|
|
|
|
|
|
|
| |
storage to newXS() seemingly forever. This involves creating
newXS_flags(), with the first flag being "arrange to copy the
filename and free it at the right time".
p4raw-id: //depot/perl@28063
|
|
|
|
|
| |
Remove its outdated documentation.
p4raw-id: //depot/perl@27498
|
|
|
|
|
| |
smaller.
p4raw-id: //depot/perl@27380
|
|
|
|
|
| |
PVGVs by another pointer.
p4raw-id: //depot/perl@27326
|
|
|
|
|
|
| |
PVMGs in pad names where previously PVGVs were used. In turn, this
gives much greater flexibility for the layout of PVGVs.
p4raw-id: //depot/perl@27312
|
|
|
| |
p4raw-id: //depot/perl@27260
|
|
|
|
|
|
| |
(And actually remove xcv_depth)
(And fix the copy lengths in bodies_by_type)
p4raw-id: //depot/perl@27249
|
|
|
|
|
|
|
|
|
| |
xcv_depth into the IV union saves 4(ish) bytes per CV and format.
"ish" because it was a long, but has been changed to I32 (along with
the corresponding field in struct block_sub) so as not to enlarge the
IV union on platforms where sizeof(long) > sizeof(IV), or struct
block_sub where sizeof(long) > sizeof(I32)
p4raw-id: //depot/perl@27247
|
|
|
|
|
| |
flag is added to denote whether the PVCV is perl or XSUB.
p4raw-id: //depot/perl@27244
|
|
|
|
|
| |
both needed.
p4raw-id: //depot/perl@27243
|
|
|
|
|
| |
PVCV is perl or XS.
p4raw-id: //depot/perl@27241
|
|
|
|
|
| |
pre-ANSI C compilers, but pays in code duplication.
p4raw-id: //depot/perl@27240
|
|
|
|
|
|
| |
and make other flag bits that are paired in the code adjacent.
Will produce tighter code on ARM; might help on other platforms too.
p4raw-id: //depot/perl@27234
|
|
|
| |
p4raw-id: //depot/perl@25233
|
|
|
|
|
|
|
|
| |
Revert the NV union back to a plain NV
Transpose the positions of IV and NV (NV is now first)
Don't allocate the NV for PV,PVIV,PVAV and PVHV (last 2 non-allocations
currently disabled by default)
p4raw-id: //depot/perl@24617
|
|
|
|
|
| |
it.
p4raw-id: //depot/perl@24569
|
|
|
| |
p4raw-id: //depot/perl@24542
|
|
|
|
|
|
|
| |
the memory to store pointers and integers.
(Part 1 - will be reworked to be more efficient when IV or void*
is 64 bit soon)
p4raw-id: //depot/perl@24538
|
|
|
|
|
| |
IV and UV. Avoid allocating a body for IVs and RVs.
p4raw-id: //depot/perl@24531
|
|
|
| |
p4raw-id: //depot/perl@22509
|
|
|
| |
p4raw-id: //depot/perl@22185
|
|
|
|
|
|
|
| |
(Lots of Perl 5 source code archaeology was involved.)
Larry didn't make strangled noises when I showed him
the patch, either :-)
p4raw-id: //depot/perl@19242
|
|
|
| |
p4raw-id: //depot/perl@19167
|
|
|
| |
p4raw-id: //depot/perl@18801
|
|
|
|
|
|
| |
Subject: Re: Did the assertion patch/feature submission get overlooked?
Message-ID: <3DE8F439.50402@yahoo.com>
p4raw-id: //depot/perl@18727
|
|
|
|
|
| |
Message-Id: <20021225210102.GA284@Bagpuss.unfortu.net>
p4raw-id: //depot/perl@18354
|
|
|
|
|
| |
Message-ID: <20021210012644.A7843@fdgroup.com>
p4raw-id: //depot/perl@18302
|
|
|
|
|
| |
Message-ID: <20021124221906.A25386@fdgroup.com>
p4raw-id: //depot/perl@18220
|