summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* refine the skip test for the 32-bit x86 ABI brokenessTony Cook2015-09-101-2/+2
| | | | | | | | | | | - the previous test checked ivsize, but that will be 8 for -Duse64bitint - similarly, byteorder is sized to an iv, so loosen that check to just make sure it's little-endian - check we have something like an Intel FPU, this particular check would give a false negative on MSVC, but these tests are skipped on Win32 anyway
* Add more -DL debugging infoKarl Williamson2015-09-081-3/+18
| | | | | This adds more stuff that gets dumped when debugging locale handling. And it adds even more when the v modifier appears.
* Rmv trailing ';' on #endifKarl Williamson2015-09-071-1/+1
| | | | This creates a compiler warning on AIX
* Fix a couple of pod issuesKarl Williamson2015-09-051-1/+1
|
* Fix broken link in pod for Hash::Util::FieldHashKarl Williamson2015-09-051-2/+2
|
* amigaos4: ext/POSIX: no fancy signalsAndy Broad2015-09-051-1/+9
|
* amigaos4: ext/POSIX: no mkfifoAndy Broad2015-09-051-1/+1
|
* amigaos4: add Amiga::ARexx and Amiga::ExecAndy Broad2015-09-0514-0/+1577
| | | | | ext seems more natural than dist since these are low-level OS glue modules (cf the VMS::* and Win32CORE), and these are not in CPAN.
* Various pods: Add C<> around many typed-as-is thingsKarl Williamson2015-09-032-2/+2
| | | | Removes 'the' in front of parameter names in some instances.
* Start fixing some pod pedantic errorsKarl Williamson2015-09-034-83/+83
| | | | This fixes a bunch of them, but there are many more
* XS-APItest/t/svpv_magic.t: Generalize for EBCDICKarl Williamson2015-09-031-2/+2
|
* XS-APItest/t/svpeek.t: Skip ASCII-centric test on EBCDICKarl Williamson2015-09-031-2/+5
|
* ext/XS-APItest/t/svcat.t: Generalize to run on EBCDICKarl Williamson2015-09-031-4/+5
|
* Avoid %Config check on Errno load if it was built with ↵Todd Rinaldo2015-08-271-2/+13
| | | | | | | | | PERL_BUILD_EXPAND_CONFIG_VARS Any person who built perl with this environment variable already has locked their install to the given platform. Therefore this check should be unnecessary on those installs. This reduces runtime bloat because Config does not have to be loaded any time someone uses $! or Errno directly.
* Do not inject use Config into Dynaloader.pm when PERL_BUILD_EXPAND_CONFIG_VARSTodd Rinaldo2015-08-271-2/+8
| | | | | The rest of the file automatically expanded Config variables, however the module was still accidentally loaded. This commit corrects the oversight.
* POSIX: version bump for d7a0f0bJarkko Hietaniemi2015-08-211-1/+1
|
* POSIX: mention the Inf, NaN constants; other small tweaksJarkko Hietaniemi2015-08-211-5/+27
|
* Update list of files to clean for ceab18aaa.Matthew Horsfall2015-08-201-1/+1
|
* b992490d copied wrong for ext re.Jarkko Hietaniemi2015-08-201-5/+5
| | | | | | This has been magically working since ext re builds with -I../.., and so picks up the inline headers from the top, the copied bogus file has been left unused.
* Eliminate PL_sawalias, GPf_ALIASED_SVDavid Mitchell2015-08-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | These two commits: v5.21.3-759-gff2a62e "Skip no-common-vars optimisation for aliases" v5.21.4-210-gc997e36 "Make list assignment respect foreach aliasing" added a run-time mechanism to detect aliased package variables, by either "*pkg = ...," or "for $pkg (...)", and used that information to enable the OPpASSIGN_COMMON mechanism at runtime for detecting common elements in a list assign, e.g. for $alias ($a, ...) { ($a,$b) = (1,$alias); } The previous commit but one changed the OPpASSIGN_COMMON mechanism such that it no longer uses PL_sawalias. So this var and the mechanism for setting it can now be removed. This commit removes: * the PL_sawalias variable * the GPf_ALIASED_SV GP flag * the SAVEt_GP_ALIASED_SV and save_aliased_sv() save type.
* make my (...) = @_ non-OPpASSIGN_COMMON_RC1David Mitchell2015-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Technically in my ($scalar,...) = @_ due to closure/goto tricks, its possible for $scalar to appear on both the LHS and RHS, so we currently set the OPpASSIGN_COMMON_RC1 flag. However, this imposes extra overhead; for example 5% extra instruction reads and 11% extra conditional branches for my ($x,$y,$z) = @_; Given what an important construct this is, disable this flag in the specific case of of only my's on the LHS and only @_ on the RHS. It's technically incorrect, but its the same behaviour we've always had (it was only the previous commit which made it safe but slower). We still set the OPpASSIGN_COMMON_AGG flag for my ($...,@a) = @_ since in the normal case this only adds the small additional runtime overhead of checking that @a is already empty.
* re-implement OPpASSIGN_COMMON mechanismDavid Mitchell2015-08-175-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit almost completely replaces the current mechanism for detecting and handing common vars in list assignment, e.g. ($a,$b) = ($b,$a); In general outline: it creates more false positives at compile-time than before, but also no longer misses some false negatives. In compensation, it considerably reduces the run-time cost of handling potential and real commonality. It does this firstly by splitting the OPpASSIGN_COMMON flag into 3 separate flags: OPpASSIGN_COMMON_AGG OPpASSIGN_COMMON_RC1 OPpASSIGN_COMMON_SCALAR which indicate different classes of commonality that can be handled in different ways at runtime. Most importantly, it distinguishes between two basic cases. Firstly, common scalars (OPpASSIGN_COMMON_SCALAR), e.g. ($x,....) = (....,$x,...) where $x is modified and then sometime later its value is used again, but that value has changed in the meantime. In this case, we need replace such vars on the RHS with mortal copies before processing the assign. The second case is an aggregate on the LHS (OPpASSIGN_COMMON_AGG), e.g. (...,@a) = (...., $a[0],...) In this case, the issue is instead that when @a is cleared, it may free items on the RHS (due to the stack not being ref counted). What is required here is that rather than making of a copy of each RHS element and storing it in the array as we progress, we make *all* the copies *before* clearing the array, but mortalise them in case we die in the meantime. We can further distinguish two scalar cases; sometimes it's possible to confirm non-commonality at run-time merely by checking that all the LHS scalars have a reference count of 1. If this is possible, we set the OPpASSIGN_COMMON_RC1 flag rather than the OPpASSIGN_COMMON_SCALAR flag. The major improvement in the run-time performance in the OPpASSIGN_COMMON_SCALAR case (or OPpASSIGN_COMMON_RC1 if rc>1 scalars are detected), is to use a mark-and-sweep scan of the two lists using the SVf_BREAK flag, to determine which elements are common, and only make mortal copies of those elements. This has a very big effect on run-time performance; for example in the classic ($a,$b) = ($b,$a); it would formerly make temp copies of both $a and $b; now it only copies $a. In more detail, the mark and sweep mechanism in pp_aassign works by looping through each LHS and RHS SV pair in parallel. It temporarily marks each LHS SV with the SVf_BREAK flag, then makes a copy of each RHS element only if it has the SVf_BREAK flag set. When the scan is finished, the flag is unset on all LHS elements. One major change in compile-time flagging is that package scalar vars are now treated as if they could always be aliased. So we don't bother any more to do the compile-time PL_generation checking on package vars (we still do it on lexical vars). We also no longer make use of the run-time PL_sawalias mechanism for detecting aliased package vars (and indeed the next commit but one will remove that mechanism). This means that more list assignment expressions which feature package vars will now need to do a runtime mark-and-sweep (or where appropriate, RC1) test. In compensation, we no longer need to test for aliasing and set PL_sawalias in pp_gvsv and pp_gv, nor reset PL_sawalias in every pp_nextstate. Part of the reasoning behind this is that it's nearly impossible to detect all possible package var aliasing; for example PL_sawalias would fail to detect XS code doing GvSV(gv) = sv. Note that we now scan the two children of the OP_AASSIGN separately, and in particular we mark lexicals with PL_generation only on the LHS and test only on the RHS. So something like ($x,$y) = ($default, $default) will no longer be regarded as having common vars. In terms of performance, running Porting/perlbench.pl on the new expr::aassign:: tests in t/perf/benchmarks show that the biggest slowdown is around 13% more instruction reads and 20% more conditional branches in this: setup => 'my ($v1,$v2,$v3) = 1..3; ($x,$y,$z) = 1..3;', code => '($x,$y,$z) = ($v1,$v2,$v3)', where this is now a false positive due to the presence of package variables. The biggest speedup is 50% less instruction reads and conditional branches in this: setup => '@_ = 1..3; my ($x,$y,$z)', code => '($x,$y,$z) = @_', because formerly the presence of @_ pessimised things if the LHS wasn't a my declaration (it's still pessimised, but the runtime's faster now). Conversely, we pessimise the 'my' variant too now: setup => '@_ = 1..3;', code => 'my ($x,$y,$z) = @_', this gives 5% more instruction reads and 11% more conditional branches now. But see the next commit, which will cheat for that particular construct.
* Increment $VERSION for POSIX to 1.56James E Keenan2015-08-101-1/+1
|
* Pod tweak for [rt.perl.org #125710].Jarkko Hietaniemi2015-08-101-1/+3
|
* 32-bit x86 ABI cannot do signaling nans [rt.perl.org #125710]Jarkko Hietaniemi2015-08-101-1/+19
| | | | | | Sleuthed by Tony Cook. The heuristics for the 'x86' part are a bit hacky and all my fault.
* Fix test label.Jarkko Hietaniemi2015-08-101-1/+1
|
* Sanity x86 long double check.Jarkko Hietaniemi2015-08-101-0/+2
|
* Added {unlock,lock}_hashref_recurse to @EXPORT_OKAaron Priven2015-08-042-0/+3
| | | | | | | | | In Hash::Util, the functions lock_hashref_recurse and unlock_hashref_recurse were omitted from the @EXPORT_OK array, the synopsis in the POD, and the test for exported functions in t/Util.t. This commit adds those functions in all three places. For: RT #125730
* Guarantee that, after unlocking, the hash is actually assignable.James E Keenan2015-08-042-3/+41
| | | | | | | | Hash::Util::unlock_hashref_recurse(); Hash::Util::unlock_hash_recurse(). Thanks to report from Diab Jerius. For: RT #125721
* add a small note that find2perl is not in coreRicardo Signes2015-08-021-2/+3
|
* XS-APItest/t/handy.t: Handle early UnicodesKarl Williamson2015-07-281-6/+11
| | | | | | | This changes, for properties that aren't defined in all Unicode versions, to use synonyms that are defined in all. It also better checks for empty property tables, and knows that the format of some returns can be different than previously constrained to be.
* dquote_static.c -> dquote.cJarkko Hietaniemi2015-07-221-5/+5
| | | | Instead of #include-ing the C file, compile it normally.
* inline_invlist.c -> invlist_inline.hJarkko Hietaniemi2015-07-221-6/+6
|
* bump $DynaLoader::VERSION to 1.33Tony Cook2015-07-201-1/+1
|
* Replace reference to newXSUB with newXS.Matthew Horsfall (alh)2015-07-201-1/+1
| | | | newXSUB hasn't been around for a long time
* Document and ensure that sv_catpvf() does no argument orderingAaron Crane2015-07-153-1/+32
| | | | | | | | | | | sv_catpvf() and friends ultimately end up calling sv_vcatpvfn_flags() with a C-style va_list argument (rather than with an array of SV pointers). When the sprintf implementation in sv_vcatpvfn_flags() is called with a va_list it always ignores any attempt by the format string to reorder the arguments. This reasonable limitation is now documented, and the implementation throws an exception when it encounters this situation. Minimal tests for these exceptions have been added to XS::APItest.
* Delete experimental autoderef featureAaron Crane2015-07-131-2/+2
|
* Don't create zero-length filename on VMS in Typemap.tCraig A. Berry2015-07-091-1/+4
| | | | | | | | | It turns out it's quite legal but then causes other mayhem, such as confusing things that are looking for the "." directory (because there is no such thing as a file without an extension so passing an empty string to fopen creates ".;1" on disk). Also make this test clean up its test files.
* dont report a $@ exception with uninitialized $!'s message in IPC::Open3Daniel Dragan2015-07-082-3/+47
| | | | | | | | | | | | | | | Commit a24d8dfd08 "Make IPC::Open3 work without fork()" from 5.003 created an eval block, and if that eval block threw an exception, instead of propagating $@, the code propagated $!, even though no system call was done and $! is effectivly unintialized data. In one case for me, a taint exception inside system was turned into open3() throwing an exception about "Inappropriate I/O control operation" or "Bad file descriptor", which had nothing to do with the real fault which was a Perl C level croak with the message "Insecure $ENV{PATH} while running with -T switch at ..." which was called as Perl_pp_system->Perl_taint_env->Perl_taint_proper-> Perl_croak->Perl_vcroak. This patch does not try to fix the ambiguity of the error messages between the !DO_SPAWN and IO::Pipe branches/implementations of _open3.
* add test that fails for #124181 to Typemap.tDaniel Dragan2015-07-083-4/+29
| | | | | | These tests will either fail with harness, and randomly SEGV for me, which is intentional since they are testing memory corruption.
* Change wording of warning due to Unicode Standard changeKarl Williamson2015-07-061-1/+1
| | | | | Non-characters are no longer forbidden as of Unicode 7.0; they are just "not recommended". The wording of the warning changes accordingly.
* Increment $VERSION in 4 .pm files whose .xs has changed.James E Keenan2015-06-273-3/+3
| | | | | | | Storable.pm I18N-Langinfo.pm POSIX.pm scalar.pm
* There is no SSize_t_size.Jarkko Hietaniemi2015-06-261-1/+1
| | | | | | Coverity CID 104775. Seemed to be the only one.
* If IVSIZE == LONGSIZE, long cannot be beyond IV_MIN/IV_MAX.Jarkko Hietaniemi2015-06-261-1/+1
| | | | | | | | It can be if LONGSIZE > IVSIZE, which should be rather rare (since Perl aims for at least long, someone would have to force IV to be 32 bits?) Coverity CID 104770.
* nl_langinfo code can be negative.Jarkko Hietaniemi2015-06-261-1/+6
| | | | Coverity CID 104814.
* strtol and strtoul base should be [2, 36] or zero.Jarkko Hietaniemi2015-06-261-26/+44
| | | | Coverity CID 104817 and CID 104836.
* tcsetattr optional_actions can be invalid.Jarkko Hietaniemi2015-06-261-1/+6
| | | | Coverity CID 104815.
* tcsetattr fd can be bad.Jarkko Hietaniemi2015-06-261-5/+10
| | | | Coverity CID 104815
* dup2 fds can be bad.Jarkko Hietaniemi2015-06-261-5/+11
| | | | Coverity CID 104812.
* tcdrain fd can be bad.Jarkko Hietaniemi2015-06-261-2/+7
| | | | Coverity CID 104838.