| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This fixes t/porting/globvar.t.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This commit will now initialize the thread-safe C locale object if the
POSIX 2008 functions are available, regardless of whether the perl is
threaded or not. This will allow for a future commit that uses
them, and which is a win on unthreaded builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that PL_sv_yes, PL_sv_undef, PL_sv_no and PL_sv_zero are allocated
adjacently in memory.
This allows the SvIMMORTAL() test to be more efficient, and will (in the
next commit) allow SvTRUE() to be more efficient.
In MULTIPLICITY builds the constraint is already met by virtue of them
being adjacent items in the interpreter struct. For non-MULTIPLICITY
builds, they were just 4 global vars with no guarantees of where
they would be allocated. For this case, PL_sv_undef are deleted
as global vars and replaced with a new global var PL_sv_immortals[4],
with
#define PL_sv_yes (PL_sv_immortals[0])
etc in their place.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Switch from two-argument form. Filehandle cloning is still done with the two
argument form for backward compatibility.
Committer: Get all porting tests to pass. Increment some $VERSIONs.
Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl
For: RT #130122
|
|
|
|
|
| |
require calls now require ./ to be prepended to the file since . is no
longer guaranteed to be in @INC.
|
|
|
|
|
|
|
| |
Because if we're running under a Unix shell, the path separator is
likely to meet the expectations of Unix shell scripts better if it's
the Unix ':' rather than the VMS '|'. There is no change when
running under DCL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is the first step in making locale handling thread-safe.
[perl #127708] was solved for 5.24 by adding a mutex in this function.
That bug was caused by the code changing the locale even if the calling
program is not consciously using locales.
Posix 2008 introduced thread-safe locale functions. This commit changes
this function to use them if the perl is threaded and the platform has
them available. This means that the mutex is avoided on modern
platforms.
It restructures the function to return a mortal copy of the error
message. This is a step towards making the function completely thread
safe. Right now, as documented, if you do 'use locale', locale handling
isn't thread-safe.
A global C locale object is created and used here if necessary. It is
destroyed at the end of the program.
Note that some platforms have a strerror_r(), which is automatically
used instead of strerror() if available. It differs form straight
strerror() by taking a buffer to place the returned string, so the
return does not point to internal static storage. One could test for
the existence of this and avoid the mortal copy.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes this flag to mean that the backward compatibility
functions are compiled unless the -DNO_MATHOMS cflag is specified to
Configure. Previously the meaning was sort of like that but not
precisely.
Doing this means that the prototypes that needed to be manually added to
mathoms.c are no longer needed. No special parameter assertions have to
be made. makedef.pl no longer needs to parse mathoms.c and have special
cases for it. And several special case entries in embed.fnc can be
non-special cased.
|
|
|
|
|
| |
By doing this, we make it more general, which will be useful in a few
commits.
|
|
|
|
|
| |
This adds a new mutex for use in the next commit for use with locale
handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit:
1. Renames the various dtrace probe macros into a consistent and
self-documenting pattern, e.g.
ENTRY_PROBE => PERL_DTRACE_PROBE_ENTRY
RETURN_PROBE => PERL_DTRACE_PROBE_RETURN
Since they're supposed to be defined only under PERL_CORE, this shouldn't
break anything that's not being naughty.
2. Implement the main body of these macros using a real function.
They were formerly defined along the lines of
if (PERL_SUB_ENTRY_ENABLED())
PERL_SUB_ENTRY(...);
The PERL_SUB_ENTRY() part is a macro generated by the dtrace system, which
for example on linux expands to a large bunch of assembly directives.
Replace the direct macro with a function wrapper, e.g.
if (PERL_SUB_ENTRY_ENABLED())
Perl_dtrace_probe_call(aTHX_ cv, TRUE);
This reduces to once the number of times the macro is expanded.
The new functions also take simpler args and then process the values they
need using intermediate temporary vars to avoid huge macro expansions.
For example
ENTRY_PROBE(CvNAMED(cv)
? HEK_KEY(CvNAME_HEK(cv))
: GvENAME(CvGV(cv)),
CopFILE((const COP *)CvSTART(cv)),
CopLINE((const COP *)CvSTART(cv)),
CopSTASHPV((const COP *)CvSTART(cv)));
is now
PERL_DTRACE_PROBE_ENTRY(cv);
This reduces the executable size by 1K on -O2 -Dusedtrace builds,
and by 45K on -DDEBUGGING -Dusedtrace builds.
|
|
|
|
|
| |
otherwise a -DPERL_NO_COW perl win32 build fails during linking perl523.dll
with missing Perl_sv_setsv_cow
|
|
|
|
| |
Saves memory in interp struct.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement our own killpg by scanning for processes in the specified
process group, which may not mean exactly the same thing as a Unix
process group, but at least we can now send a signal to a parent (or
master) process and all of its sub-processes. In Perl-land, this
means we can now send a negative pid like so:
kill SIGKILL, -$pid;
to signal all processes in the same group as $pid.
|
|
|
|
|
|
|
|
|
|
|
| |
This initialization is done before the processing of command line
arguments, so that it has to be handled specially. This commit changes
the initialization code to output debugging information if the
environment variable PERL_DEBUG_LOCALE_INIT is set.
I don't see the need to document this outside the source, as anyone who
is using it would be reading the source anyway; it's of highly
specialized use.
|
|
|
|
|
| |
Those symbols can and must exist for the -Duseperlio case, which
is the only configuration possible since 5.16.x.
|
|
|
|
|
|
| |
The CRTL has supplied getlogin since v7.0, so let's not use the
home-made one anymore. Plus the CRTL als has a reentrant version,
so we'll use that under threads.
|
| |
|
| |
|
|
|
|
|
|
| |
Make the function Perl_op_parent() only be present in perls built with
-DPERL_OP_PARENT. Previously the function was present in all builds, but
always returned NULL on non PERL_OP_PARENT builds.
|
|
|
|
|
|
| |
It's not a file that anyone ever really looks inside anyway, so it's not
worth the possible future breakage if we ever have a PL_ symbol 32 or more
characters long.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously on Win32 Perl, all the PL_* data symbols were treated as
function symbols with expectation of machine code at their targets when
generating the linking library perl5**.lib or perl5**.a. In VC Perl, if an
DLL XS module accidentally (by manipulating the defines before #including
perls headers) turned "extern __declspec(dllimport) I32 *PL_markstack_ptr;"
into "extern I32 *PL_markstack_ptr;", a SEGV would result as if the XS
module executed "I32 ax = (*(I32*)Perl_sv_2mortal)--;". By marking the
symbols as data in the linking lib, the VC linker will error out while
creating a XS DLL where this mistake of dropping out __declspec(dllimport)
happened, instead of a runtime crash. Mingw GCC linker does the correct
behavior, and does not treat the data symbol as machine code even if
"__declspec(dllimport)" is removed. Still add DATA to the GCC perldll.def
to be sure. There is no reason for "jmp" machine codestubs/thunks to
exist in the perl.lib/perl.a to a data export.
Also add constant folding to the loop in makedef.pl, since every other
platform check executes exactly once, there is no point of executing the
ops in the perl compile time constant folder vs runtime executing them.
If a data symbol name exceeds the 32 limit, then "DATA" will be catted onto
the symbol name and linking lib generation will fail since the symbol wont
exist. The 32 limit will then be increased at that point in the future.
See details about this patch in [perl #123626]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's easy enough to read the list out of mathoms.c directly, and this should
prevent almost all bugs of the sort that were fixed by
083750a56b7927292a4bf7b1bf64aa26dd2a6858. (Only names that don't begin with
"Perl_" will cause a problem.)
The list of names detected automatically may actually differ slightly from
the hard-coded list; for example, the definition of Perl_huge() is inside
"#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))",
but the new code in makedef.pl ignores preprocessor conditions. However, the
list is used as names to *skip*, rather than to include, so it's not a
problem if makedef.pl is willing to skip names that it will never be asked
to include.
|
|
|
|
|
| |
commit 09d7a3ba91 moved Perl_pad_compname_type to mathoms but didn't
update makedef.pl. This causes a link failure of perl521.dll on Win32.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CvRESERVED is a placeholder, it will be replaced with a sentinal value
from future revised BOOTCHECK API.
CvPADLIST_set was helpful during development of this patch, so keep it
around for now.
PoisonPADLIST's magic value is from PERL_POISON 0xEF pattern. Some
PoisonPADLIST locations will get code from future BOOTCHECK API.
Make padlist_dup a NN function to avoid overhead of calling it for XSUBs
during closing.
Perl_cv_undef_flags's else if (CvISXSUB(&cvbody)) is to avoid whitespace
changes.
Filed as perl [#123059].
|
|
|
|
|
| |
If you try to export symbols which dont exist, VC linker fails. NO_MATHOMS
now works on Win32. The list of symbols is from VC's error log.
|
|
|
|
|
|
|
| |
By prepending 'PL_' to each line in globvar.sym, it
a) makes makedef.pl slightly simpler,
b) makes it easier to spot all usage of a particular var when you
do 'git grep PL_foo'
|
| |
|
|
|
|
|
|
| |
MAD = Misc Attribute Decoration; unmaintained attempt at preserving
the Perl parse tree more faithfully so that automatic conversion to
Perl 6 would have been easier.
|
|
|
|
|
|
|
|
| |
Useful for at least debugging.
Supported in Linux and OS X (possibly to some extent in *BSD).
See perlhacktips for details.
|
|
|
|
|
|
|
|
|
| |
Because makedef.pl doesn't take into account the various ifdefs
in embed.fnc, it must repeat their logic by maintaining various
sets of platform-specific inclusions and exclusions.
Perl_my_setlocale was added in b385bb4ddcb for Win32 only, so we
shouldn't be telling the linker to export it except on Win32.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The last Perl release that built with -Dusesfio was v5.8.0, and even that
failed many regression tests. Every subsequent release fails to build, and
in the decade that has passed we have had no bug reports about this. So it's
safe to delete all the code. The Configure related code will be purged in a
subsequent commit.
2 references to sfio intentionally remain in fakesdio.h and nostdio.h, as
these appear to be for using its stdio API-compatibility layer.
|
|
|
|
|
|
| |
Eliminate their function prototypes. Eliminate references in perlio.sym and
makedef.pl which caused them to still be added to the Win32 linker
definitions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit c82ecf346.
It turn out to be faulty, because a location shared betweens threads
(the cop) was holding a reference count on a pad entry in a particu-
lar thread. So when you free the cop, how do you know where to do
SvREFCNT_dec?
In reverting c82ecf346, this commit still preserves the bug fix from
1311cfc0a7b, but shifts it around.
|
|
|
|
|
| |
This linker skip was missed by commit c82ecf346a8512f2, which did add the 3
PL_ variables it added for ithreads builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This saves having to allocate a separate string buffer for every cop
(control op; every statement has one).
Under non-threaded builds, every cop has a pointer to the GV for that
source file, namely *{"_<filename"}.
Under threaded builds, the name of the GV used to be stored instead.
Now we store an offset into the per-interpreter PL_filegvpad, which
points to the GV.
This makes no significant speed difference, but it reduces mem-
ory usage.
|
| |
|
|
|
|
|
| |
Add David Steinbrunner to AUTHORS.
Update pod issues database.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the next patch, I have Perl_croak_memory_wrap defined in embed.fnc with
the 'nroX' flags, since this is a private function used by public macros.
I used the long form of the name Perl_croak_memory_wrap everywhere, and
used the 'o' flag so that embed.h wouldn't contain a useless #define
croak_memory_wrap Perl_croak_memory_wrap. Unfortunately, makedef.pl
(used by the Win32 build process) didn't know what to do with that entry
and created an entry Perl_Perl_croak_memory_wrap. Changing makedef.pl
to use the 'o' flag to decide whether to add the Perl_ prefix resulted
in over 50 other symbols changing in the output of makedef.pl. I don't
know if the changes are correct or if the 'o' flag is in error on those
entries in embed.fnc, but I don't have time to check them all out.
This patch just stops makedef.pl from adding a Perl_ prefix if there is
already one there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
extension building problems remain but the 2 above files will build be
built for WinCE with the following 3 commands, replace the folder name with
what you selected for $(MACHINE) in makefile.ce
nmake all
nmake -f makefile.ce wince-x86-hpc-wce300\perl517.dll
nmake -f makefile.ce wince-x86-hpc-wce300\perl.exe
makefile.ce:
- -debug:full and -pdb:none are obsolete compiler flags,
and add -opt:ref:icf, to sync eVC makefile with modern VC's makefile
- create a shortcut for easily creating preprocessed (.i) files for
debugging on the command line
- add new interp .c files that were added over the years
- the Dynaloader build process for Win32 was drastically changed in
commit 281da5eaa8 , fix to reflect this, a "nmake all" on the Win32 build
will create the correct dynaloader .c files for the ce makefile to use
later
- nothing depended on .\xconfig.h in the ce makefile, so there was an error
that it was missing, fix that
- rebase the CE perl5**.dll to same as on Win32 makefile, makes
debugging/diassembly much easier when the dll is not relocated at runtime
- config.sh seems to be a win32 build file, while the script configpm
wants a .sh file in \Cross, so change config.sh dependency to that
win32/Makefile:
- add a preprocess target to easily create .i files for debugging by hand
makedef.pl:
- read the comments in the script
- config.h is Win32 file, not a WinCE file, so use xconfig.h when
under WinCE
lib/.gitignore
- Cross.pm is made during the build process, it shouldn't ever be commited
win32/.gitignore
- xconfig.h is made during the build process, it shouldn't ever be commited
win32/wince.c
- identifier isnan is defed to _isnan somewhere, this created an infinite
loop when CE perl was run
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 1a904fc88069e249a4bd0ef196a3f1a7f549e0fe disabled
PL_sawampersand by default, since it was redundant with COW enabled.
However the mechanism to optionally re-enable it (PERL_SAWAMPERSAND)
didn't actually export the var, due to a typo.
With the new default of disabling COW but enabling PL_sawampersand,
this broke perl on builds where exports matters (and broke linux in
non-threaded builds, where porting/globvar.t detects this).
|
| |
|
|
|
|
|
|
|
|
| |
An inline function is static to the file it is defined in. But they can
be part of the public API if they are in #included header files and
defined in embed.fnc. Normally such functions are written to the export
list on platforms that have this, but since they are static, you get a
linkage error. This commit suppresses the writing of inline functions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PL_sawampersand actually causes bugs (e.g., perl #4289), because the
behaviour changes. eval '$&' after a match will produce different
results depending on whether $& was seen before the match.
Using copy-on-write for the pre-match copy (preceding patches do that)
alleviates the slowdown caused by mentioning $&. The copy doesn’t
happen unless the string is modified after the match. It’s now a
post- match copy. So we no longer need to do things differently
depending on whether $& has been seen.
PL_sawampersand is now #defined to be equal to what it would be if
every program began with $',$&,$`.
I left the PL_sawampersand code in place, in case this commit proves
immature. Running Configure with -Accflags=PERL_SAWAMPERSAND will
reënable the PL_sawampersand mechanism.
|