| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary for an upcoming bug fix.
(For this bug:
@left::ISA = 'outer::inner';
@right::ISA = 'clone::inner';
*clone:: = \%outer::;
print left->isa('clone::inner'),"\n";
print right->isa('outer::inner'),"\n";
)
This commit actually replaces mro_isa_changed_in with
mro_isa_changed_in3. See the docs for it in the diff for mro.c.
|
|
|
|
|
|
| |
Previously we always called Gconvert(), then tested its string output, then
fixed that up if necessary. This way has fewer tests. We can also reduce the
memory allocation for the string output for the case of zero.
|
| |
|
|
|
|
|
|
|
|
|
| |
Allowing BhkENTRY(bhk, start) to look up the bhk_start member defeats
much of the point of having a bhk_ prefix in the first place: if a
member is added later called (say) 'bhk_die', any invocation of
BhkENTRY(bhk, die) will expand to BhkENTRY(bhk, Perl_die) because of the
API macros. Requiring BhkENTRY(bhk, bhk_start), while tedious, is much
safer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
| |
The previous two commits made it non-recursive on AVs. With that
machinery in place, it's now trivial to extend it to RVs too.
This means that now any depth nesting of AVs and RVs will be freed
in a single call to sv_clear().
|
|
|
|
|
|
| |
The previous commit wrapped most of sv_clear in a big while loop,
but didn't re-indent everything, to keep the change clear.
So re-indent now, and wrap long lines. Only whitespace changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In sv_clear(), rather than calling av_undef(), iterate over the AV's
elements. This is the first stage in making sv_clear() non-recursive,
and thus non-stack-blowing when freeing deeply nested structures.
Since we no longer have the stack to maintain the chain of AVs currently
being iterated over, we instead store a pointer to the previous AV in the
AvARRAY[AvMAX] slot of the currently-being-iterated AV. Since our first
action is to pop the first SV, that slot is guaranteed to be free, and
(in theory) nothing should be messing with the AV while we iterate over
its elements, so that slot should remain undisturbed.
|
|
|
|
|
| |
When cloning an SV, new_SV() was setting sv_debug_file, then we
immediately set it again without freeing the first one.
|
|
|
|
|
| |
Another compiler gave another warning, that this should fix. The
expression should have been cast to a bool all along
|
| |
|
|
|
|
|
| |
in the new File::DosGlob tests that came in with
2f3c8ce922663caa9b02d9fddae7536225b6f95d.
|
|
|
|
|
| |
Moves the various scripts that are called by regen.pl to a subdirectory
to reduce clutter.
|
| |
|
|
|
|
|
|
|
|
| |
This makes string-to-glob assignment and hashref-to-glob assignment
reset isa caches by calling mro_package_moved, if the glob’s name
ends with ::.
Related to [perl #75176].
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only applies to glob-to-glob assignments and deletions of stash
elements. Other types of stash manipulation are dealt with by subse-
quent patches.
It adds mro_package_moved, a private function that iterates through
subpackages, calling mro_isa_changed_in on each.
This is related to [perl #75176], but is not the same bug. It simply
got in the way of fixing [perl #75176].
|
|
|
|
| |
Follow-up to 07004ebbe530fe5ce1c67e63c0b8e1c0aa77b3b9.
|
| |
|
|
|
|
|
|
|
| |
Previously yylex() was conditionally populating @AnyDBM_File::ISA (if it was not
set, and the token dbmopen was seen), and init_predump_symbols() was populating
@IO::File::ISA (unconditionally, but this is so early that nothing previously
could have set it). This refactoring eliminates code duplication.
|
| |
|
|
|
|
| |
997daa56862a0fc7 eliminated the need for passing these in.
|
|
|
|
|
|
|
|
|
|
|
| |
case KEY_dbmopen in Perl_yylex() has always had special-case code to create
@AnyDBM_File::ISA, using GV_ADDMULTI. S_gv_magicalize_isa() [part of
Perl_gv_fetchpvn_flags()] has special case code to spot "AnyDBM_File::ISA"
being created with GV_ADDMULTI, and populate the variable if it is empty.
Grouping the special case code in one place makes more sense. Removing the
special case code from gv.c means that there is no longer a check clause in the
code path for *every* package's @ISA initialisation.
|
| |
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
|
|
|
|
| |
GvHV() and HvNAME() will both always already be set, as gv_fetchpvn_flags()
will initialise these as it walks the string in its initial loop to locate the
correct stash, then return early because name == name_end.
This code has been dead since it was added in 5.000.
|
|
|
|
|
|
|
|
|
| |
It used to be that once or twice per decade a symbol longer than
31 characters snuck into the core and we had to manually shorten
it to get the build working. But it's happened twice in the last
month, most recently with the humanly unswallowable function name
XS_XS__APItest__XSUB_XS_VERSION_undef, so the need for a more
general solution has become not only apparent but mandatory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Traditionally Perl does its own name shortening in
ExtUtils::XSSymSet to get around the 31-character limit
on symbol names in the VMS linker. That method predates
the availability of the /NAMES=SHORTENED option in the
C compiler, which uses the same algorithm as the C++
name mangler to produce shortened symbols. This change
makes configuration with -Duseshortenedsymbols select
the compiler's shortening over the home-grown shortening.
The advantages of the compiler option over the home-grown
option are that hand-coded long symbols in the core can be
handled (instead of only generated XS_... symbols); long
symbols in external libraries can be handled; and eventually
we can remove XSSymSet and have less to maintain.
84efe3dfc6afbd8ea017ddcc4d5d213cc1a35c72 is required to travel
wherever this change travels for extension building to work
properly.
|
|
|
|
|
|
|
|
|
| |
If the soon-to-be-implemented configuration option
-Duseshortenedsymbols has been selected, bypass the home-grown
symbol shortening traditionally done by xsubpp because the
compiler's /NAMES=SHORTENED feature will be used instead.
This is only relevant on VMS.
|
|
|
|
| |
Bug spotting and 1 fix by Jerry D. Hedden.
|
|
|
|
| |
Use fewer mortals, and avoid leaking an SV if upg_version() croaks.
|
|
|
|
|
|
| |
The previous macro generated over .5K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about .5K (once), to save .5K for every XS module loaded.
|
| |
|
|
|
|
| |
XS_VERSION_BOOTCHECK() is the public API.
|
|
|
|
|
|
| |
Replace complex format strings ternary conditionals with an if/else block.
Avoid assignment within expressions. Directly use the SV for the module's name,
rather than converting it to a char *.
|
|
|
|
|
|
|
| |
It's unlikely that XS_VERSION will contain a bogus version string (for long),
but the value passed in (or derived from $XS_VERSION or $VERSION) might well.
For that case, without this change, temporary SVs created within
xs_version_bootcheck() won't be freed (before interpreter exit).
|
|
|
|
|
|
|
|
|
|
|
| |
perl_construct() sets the current interpreter context, and ends in an ENTER.
Hence threads::shared needs to restore the interpreter context, and balance the
ENTER with a leave. Previously it was using its PERL_SET_CONTEXT() macro,
which also contains a FREETMPS. However, this FREETMPS is erroneous in this
specific context, as it does not have a balancing SAVETMPS. Hence calling
SAVETMPS here would run it in the context of the shared interpreter, but it
would (attempt to) free up temporaries created in the context of the parent
interpreter.
|
|
|
|
|
|
|
|
|
|
| |
Multiple code paths were dereferencing version objects without
checking the underlying type, which could result in segmentation
faults per RT#78286
This patch consolidates all dereferencing into vverify() and
has vverify return the underlying HV or NULL instead of
a boolean value.
|
| |
|
| |
|
|
|
|
|
|
| |
The state of the POD file cleanup code in the Win32 makefiles had parted
company with what pod/buildtoc was looking for. Fix the script for the
current state of play and regenerate the makefiles.
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
|
|
| |
The macro expansion generates over 1K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about 1K (once), to save 1K for every XS module loaded.
|
| |
|
|
|
|
|
| |
Document that all arguments are passed on to the module's bootstrap function,
and the behaviour of the bootstrap function in modules built by xsubpp.
|