This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agoRemove some _get variants of *NAMEUTF8 macros in [gh]v.h
Father Chrysostomos [Sat, 24 Sep 2011 17:17:58 +0000 (10:17 -0700)]
Remove some _get variants of *NAMEUTF8 macros in [gh]v.h

For macros that returns flags, the _get convention implies that there
could be a _set variant some day.  But we don’t do that for flags.

9 years agoRestore gv_fetchmeth to perlapi
Father Chrysostomos [Tue, 20 Sep 2011 22:13:59 +0000 (15:13 -0700)]
Restore gv_fetchmeth to perlapi

9 years agoMinor correction to gv_fetchmeth.t
Father Chrysostomos [Fri, 23 Sep 2011 03:37:11 +0000 (20:37 -0700)]
Minor correction to gv_fetchmeth.t

It wasn’t doing the XS::APItest::gv_fetchmeth_type sanity check for
all three gv_fetchmeth* functions.

9 years agogv.c: Added gv_fetchmeth_(sv|pv|pvn).
Brian Fraser [Tue, 5 Jul 2011 05:14:59 +0000 (02:14 -0300)]
gv.c: Added gv_fetchmeth_(sv|pv|pvn).

I'm probably pushing this too early. Can't do the
Perl-level tests because of that. TODO.

9 years agoDocument gv_init*
Father Chrysostomos [Fri, 23 Sep 2011 01:21:28 +0000 (18:21 -0700)]
Document gv_init*

9 years agogv.c: Added gv_init_(sv|pv|pvn), renamed gv_init_sv as gv_init_svtype.
Brian Fraser [Tue, 5 Jul 2011 04:27:13 +0000 (01:27 -0300)]
gv.c: Added gv_init_(sv|pv|pvn), renamed gv_init_sv as gv_init_svtype.

gv_init_pvn() is the same as the old gv_init(), but takes
a flags parameter, which will be used for the UTF-8 cleanup.

The old gv_init() is now implemeneted as a macro in gv.h.

Also included is some minimal testing in XS::APItest.

9 years agoGroundwork to allow cops and pmops to store the UTF8 flag
Brian Fraser [Tue, 5 Jul 2011 03:13:02 +0000 (00:13 -0300)]
Groundwork to allow cops and pmops to store the UTF8 flag

With threaded builds, cop.h and op.h get an extra member in their
structs, to save the UTF-8ness of the stash's name.

*STASH_set() checks for the flag, stores it through
*STASH_flags(), and *STASH() uses the latter to fetch the
correct scalar.

9 years agoUTF-8 related macros in hv.h and gv.h
Brian Fraser [Tue, 5 Jul 2011 03:12:02 +0000 (00:12 -0300)]
UTF-8 related macros in hv.h and gv.h

Groundwork for the following commits.

9 years agoIn bisect-runner.pl, if getconf exists, use it to report the number of CPUs.
Nicholas Clark [Thu, 6 Oct 2011 15:13:29 +0000 (17:13 +0200)]
In bisect-runner.pl, if getconf exists, use it to report the number of CPUs.

Thanks to David Leadbeater for the suggestion.

9 years agoWhitespace
H.Merijn Brand [Thu, 6 Oct 2011 15:11:31 +0000 (17:11 +0200)]
Whitespace

9 years agoNow with comma :(
H.Merijn Brand [Thu, 6 Oct 2011 08:14:07 +0000 (10:14 +0200)]
Now with comma :(

9 years ago_A is predefined in some precompiler environments
H.Merijn Brand [Thu, 6 Oct 2011 08:10:31 +0000 (10:10 +0200)]
_A is predefined in some precompiler environments

On HP-UX 10.20 in the HP C-ANSI-C environment

  CAT2(macro, _A)

expands to

  macro01

as _A obviously expands to 01. This fix "breaks" the token

9 years agoRemove whitespace errors from bisect-runner.pl
Nicholas Clark [Wed, 5 Oct 2011 19:38:23 +0000 (21:38 +0200)]
Remove whitespace errors from bisect-runner.pl

2 trailing spaces and 1 piece of "trailing garbage" in a patch now gone.

9 years agobisect-runner.pl now runs all build commands with STDIN of /dev/null
Nicholas Clark [Wed, 5 Oct 2011 19:25:47 +0000 (21:25 +0200)]
bisect-runner.pl now runs all build commands with STDIN of /dev/null

This should avoid any problems with confused build commands wanting to read
from STDIN and causing the bisect to hang waiting on user input from the
terminal.

9 years agobisect-runner.pl should remove the stdin-is-a-tty test completely.
Nicholas Clark [Wed, 5 Oct 2011 19:04:01 +0000 (21:04 +0200)]
bisect-runner.pl should remove the stdin-is-a-tty test completely.

Before commit dfe9444ca7881e71, Configure would refuse to run if STDIN was
not a tty. dbcdc176dfaaa83c adapted bisect-runner.pl to deal with this by
skipping closing STDIN for old Configure. However, it's actually much simpler
and safer to patch Configure to remove the test, and then always run it with
STDIN closed. This also avoids problems with ./makedepend hanging on STDIN
in some cases.

9 years agoDocument why bisect.pl can't be in the checkout used for bisecting.
Nicholas Clark [Wed, 5 Oct 2011 16:19:37 +0000 (18:19 +0200)]
Document why bisect.pl can't be in the checkout used for bisecting.

Add a sanity test to catch this case.

9 years agoImprove bisect.pl's documentation.
Nicholas Clark [Wed, 5 Oct 2011 15:52:23 +0000 (17:52 +0200)]
Improve bisect.pl's documentation.

9 years agobisect-runner.pl needs to add -L/usr/local/lib prior to 5.002 on FreeBSD.
Nicholas Clark [Wed, 5 Oct 2011 15:27:43 +0000 (17:27 +0200)]
bisect-runner.pl needs to add -L/usr/local/lib prior to 5.002 on FreeBSD.

This may well also be needed on some other platforms, but as it has to be
done in the middle of the Configure run, there isn't a clean cross-platform
way to do it.

With this, FreeBSD will build all extensions back to 5.001n, and miniperl
back to 5.000. I don't think that it's going to be possible to improve on
that (without cheating and using a config.sh imported from the "future").

9 years agobisect-runner.pl needs to inline $compile into the test for malloc.h
Nicholas Clark [Wed, 5 Oct 2011 14:51:16 +0000 (16:51 +0200)]
bisect-runner.pl needs to inline $compile into the test for malloc.h

Prior to bd9b35c97ad661cc Configure had the malloc.h test before the
definition of $compile. With this, bisect-runner.pl can build all
extensions back to perl-5.002.

9 years agoAdd 'Fcntl' as a target for bisect-runner.pl.
Nicholas Clark [Wed, 5 Oct 2011 13:34:20 +0000 (15:34 +0200)]
Add 'Fcntl' as a target for bisect-runner.pl.

This builds the Fcntl shared library, which provides a test of whether XS
modules can be built. Clarify that the 'perl' target does *not* build XS
modules.

Fix a bug with the 'lib/Config.pm' target and -e. This target will only build
miniperl, not perl, so -e needs to use the former to run the one-liner.

9 years agoIn bisect-runner.pl, patch Configure to test-compile #include <malloc.h>
Nicholas Clark [Wed, 5 Oct 2011 11:34:10 +0000 (13:34 +0200)]
In bisect-runner.pl, patch Configure to test-compile #include <malloc.h>

On (at least) FreeBSD malloc.h just gives a compile error saying to use
stdlib.h instead. This is commit 01d07975f7ef0e7d, trimmed.

With this, bisect.pl can build perl-5.8.0 on FreeBSD.

9 years agoUpdate Module-Load to CPAN version 0.22
Chris 'BinGOs' Williams [Wed, 5 Oct 2011 08:55:23 +0000 (09:55 +0100)]
Update Module-Load to CPAN version 0.22

  [DELTA]

  Changes for 0.22    Tue Oct  4 21:44:32 2011
  ============================================
  * Resolve possible security problem [http://goo.gl/YzHRU]
    where a '::' prefixed module can 'jump' out of @INC

9 years agoIn bisect-runner.pl always use blead's hitnts/freebsd.sh
Nicholas Clark [Wed, 5 Oct 2011 10:39:40 +0000 (12:39 +0200)]
In bisect-runner.pl always use blead's hitnts/freebsd.sh

There are rather too many version-specific FreeBSD hints fixes to patch
individually. Also, more than once the FreeBSD hints file has been written
in what turned out to be a rather non-future-proof style, with case
statements treating the most recent version as the exception, instead of
treating previous versions' behaviour explicitly and changing the default to
cater for the current behaviour. (As strangely, future versions inherit the
current behaviour.)

If /sbin/sysctl exists, use it to find the number of CPUs and hence a
default for the number of make jobs to run in parallel.

9 years agoNote ExtUtils::ParseXS upgrade in perldelta
Steffen Mueller [Wed, 5 Oct 2011 06:25:03 +0000 (08:25 +0200)]
Note ExtUtils::ParseXS upgrade in perldelta

9 years agoUpgrade ExtUtils::ParseXS to 3.05
Steffen Mueller [Wed, 5 Oct 2011 06:23:20 +0000 (08:23 +0200)]
Upgrade ExtUtils::ParseXS to 3.05

No functional changes from 3.04_04, just a promotion to "stable".

9 years agoIn bisect-runner.pl, only force Configure's libpth on x86_64 Linux.
Nicholas Clark [Tue, 4 Oct 2011 20:36:38 +0000 (22:36 +0200)]
In bisect-runner.pl, only force Configure's libpth on x86_64 Linux.

Also, if /proc/cpuinfo can be opened and parsed, default the make jobs to one
more than the number of CPUs. Otherwise, default to 2 jobs.

9 years agoShow that blessed comes from Scalar::Util in code example
Dave Rolsky [Tue, 4 Oct 2011 16:32:53 +0000 (11:32 -0500)]
Show that blessed comes from Scalar::Util in code example

9 years agopodcheck.t: Guard against weird input file types
Karl Williamson [Tue, 4 Oct 2011 02:49:10 +0000 (20:49 -0600)]
podcheck.t: Guard against weird input file types

This causes podcheck to only analyze non-zero length files that we can
read and are plain files or symbolic links.

Perhaps symbolic links should be skipped as well.  In the current blead,
experimenting with doing that made no difference.

9 years agobisect-runner.pl needs to patch ext/IPC/SysV/SysV.xs for "newer" Linux.
Nicholas Clark [Mon, 3 Oct 2011 19:11:34 +0000 (21:11 +0200)]
bisect-runner.pl needs to patch ext/IPC/SysV/SysV.xs for "newer" Linux.

(dromedary is built from a sufficiently "special biologist word"
distribution that it doesn't need this)

9 years agobisect-runner.pl should check for t/perl when building test_prep.
Nicholas Clark [Mon, 3 Oct 2011 17:49:18 +0000 (19:49 +0200)]
bisect-runner.pl should check for t/perl when building test_prep.

Checking for perl doesn't spot the cases where make aborts after perl is
built but before test_prep is completed.

9 years agoFix two typos in the documentation for bisect-runner.pl
Nicholas Clark [Mon, 3 Oct 2011 16:05:04 +0000 (18:05 +0200)]
Fix two typos in the documentation for bisect-runner.pl

9 years agoDocumentation for bisect.pl and bisect-runner.pl
Nicholas Clark [Mon, 3 Oct 2011 15:41:18 +0000 (17:41 +0200)]
Documentation for bisect.pl and bisect-runner.pl

9 years agoIn bisect-runner.pl, fix a bug where a good "test_prep" build would skip.
Nicholas Clark [Mon, 3 Oct 2011 15:07:05 +0000 (17:07 +0200)]
In bisect-runner.pl, fix a bug where a good "test_prep" build would skip.

The "skip"/continue logic was not aware that the build code could change
"test_prep" to "test-prep" or "test" on very old perls, and so was looking
for a file that did not exist, instead of ./perl, and then signaling a
"skip" because it could not find it.

Also fix a fencepost error for the -j test - 5.10.0 (inclusive) and later
are safe to build with paralllel make.

9 years agoIn bisect.pl, support matching on files generated by the build.
Nicholas Clark [Mon, 3 Oct 2011 11:23:44 +0000 (13:23 +0200)]
In bisect.pl, support matching on files generated by the build.

If --target isn't specified, then --match will match files in the repository.
If --target is specified, then --mach will match built files (and ignore files
in the repository)

Add 'config.h' as a known target. If a "binary" file matches, print only
the file name, not the "binary" match. Print the match count as part of the
good/bad report line.

9 years agoIf patching fails, bisect-runner.pl should report the name of the file.
Nicholas Clark [Mon, 3 Oct 2011 09:39:58 +0000 (11:39 +0200)]
If patching fails, bisect-runner.pl should report the name of the file.

When commit 0142f0ceeb8dc10a refactored the relevant code into apply_patch(),
it left "perl.c" hard coded into an error message.

9 years agoAdd another exception to dual-life.t
Father Chrysostomos [Mon, 3 Oct 2011 00:56:51 +0000 (17:56 -0700)]
Add another exception to dual-life.t

Module::Build’s tests create a file named something like

    cpan/Module-Build/MB-rrWnCs8O/Simple/bin/foo.PL

during testing, causing dual-life.t to fail when testing in
parallel.

This commit adds that to the list of exceptions, but since the
exact name can vary, it changes the exception list into a
regular expression.

9 years agoStop dual-life.t from failing during parallel testing
Father Chrysostomos [Sun, 2 Oct 2011 23:26:42 +0000 (16:26 -0700)]
Stop dual-life.t from failing during parallel testing

dual-life.t makes sure all dual-lifed scripts make their way into
utils/ during make.

ExtUtils::Install creates a test script in
dist/ExtUtils-Install/t/Big-Dummy/bin/program during testing.

dual-life.t should skip anything containing /t/, to avoid failing
erroneously.

9 years agoRemove unused variable from S_set_caret_X
Father Chrysostomos [Sun, 2 Oct 2011 21:04:12 +0000 (14:04 -0700)]
Remove unused variable from S_set_caret_X

9 years agobisect-runner.pl must use Fcntl::S_IMODE() on the raw output from stat.
Nicholas Clark [Sun, 2 Oct 2011 20:26:14 +0000 (22:26 +0200)]
bisect-runner.pl must use Fcntl::S_IMODE() on the raw output from stat.

Fixes a bug whereby it was failing to mask out the non-file-mode bits from
the return value from stat when testing whether the mode had changed.

9 years agoUpdate Unicode-Collate to CPAN version 0.79
Chris 'BinGOs' Williams [Sun, 2 Oct 2011 18:36:35 +0000 (19:36 +0100)]
Update Unicode-Collate to CPAN version 0.79

  [DELTA]

  0.79  Sun Oct  2 20:31:01 2011
    - pod: [rt.cpan.org #70241] Fix minor grammar error in manpage
            by Harlan Lieberman-Berg.
    - 'suppress' no longer affects contractions via 'entry'.
    - U::C::Locale newly supports locales: as, fi__phonebook, gu.
    - added loc_as.t, loc_fiph.t, loc_gu in t.
    - updated some locales to CLDR 2.0 : ar, be, bg.

9 years agoUpdate Digest to CPAN version 1.17
Chris 'BinGOs' Williams [Sun, 2 Oct 2011 18:24:33 +0000 (19:24 +0100)]
Update Digest to CPAN version 1.17

  [DELTA]

  2011-10-02   Gisle Aas <gisle@ActiveState.com>

   Release 1.17.

   Gisle Aas (6):
      Less noisy 'git status' output
      Merge pull request #1 from schwern/bug/require_eval
      Don't clobber $@ in Digest->new [RT#50663]
      More meta info added to Makefile.PL
      Fix typo in RIPEMD160 [RT#50629]
      Add schwern's test files

   Michael G. Schwern (5):
      Turn on strict.
      Convert tests to use Test::More
      Untabify
      Turn Digest::Dummy into a real file which exercises the Digest->new() require logic.
      Close the eval "require $module" security hole in Digest->new($algorithm)

9 years agoAdd 'config.sh' as a build target for bisect.pl
Nicholas Clark [Sun, 2 Oct 2011 17:31:59 +0000 (19:31 +0200)]
Add 'config.sh' as a build target for bisect.pl

This allows one to bisect to find which commit caused Configure options to
stop/start Configure running to completion.

9 years agoPermit bisect.pl to pass -D, -U and -A parameters to Configure.
Nicholas Clark [Sun, 2 Oct 2011 14:22:06 +0000 (16:22 +0200)]
Permit bisect.pl to pass -D, -U and -A parameters to Configure.

This gives pretty much complete control of the configuration options for a
bisect run.

9 years agoRefactor bisect-runner.pl to use the hashref interface to GetOptions().
Nicholas Clark [Sun, 2 Oct 2011 11:50:26 +0000 (13:50 +0200)]
Refactor bisect-runner.pl to use the hashref interface to GetOptions().

This eliminates many lexical variables used only to hold option state.

9 years agoRefactor bisect.pl to use Getopt::Long's pass_through option.
Nicholas Clark [Sun, 2 Oct 2011 09:33:44 +0000 (11:33 +0200)]
Refactor bisect.pl to use Getopt::Long's pass_through option.

Add a --check-args option to bisect-runner.pl to validate the arguments that
bisect.pl doesn't know how to check (else the automatic start detection
will get very confused by invalid arguments). Switch bisect.pl to bundling,
which permits the "traditional" make argument form of -j4 to be used instead
of -j=4. As this actually makes -j=4 invalid syntax now (an error about the
unknown option "="), change the syntax messages.

9 years agoTypo in comment share_hek_kek
Reini Urban [Sun, 2 Oct 2011 00:07:11 +0000 (19:07 -0500)]
Typo in comment share_hek_kek

9 years agohandy.h: Reorder tests for speed
Karl Williamson [Sat, 1 Oct 2011 19:02:41 +0000 (13:02 -0600)]
handy.h: Reorder tests for speed

It's much more likely that a random character will have its ordinal be
above the ordinal for '7' than below.  In the test for if a character is
octal then, testing first if it is <= '7' will exclude many more
possibilities than if the first test is if it is >= '0'.

I left the ones for lowercase letters in the same order, because, in
ASCII, anyway, there are more characters below 'a' than above it.

9 years agohandy.h: Add macro
Karl Williamson [Sat, 1 Oct 2011 19:02:31 +0000 (13:02 -0600)]
handy.h: Add macro

9 years agohandy.h Fix isOCTAL_A macro
Karl Williamson [Sat, 1 Oct 2011 18:59:34 +0000 (12:59 -0600)]
handy.h Fix isOCTAL_A macro

This has the incorrect definition, allowing 8 and 9, for programs that
don't include perl.h.  Likely no one actually uses this recently added
macro who doesn't also include perl.h.

9 years agoIn bisect.pl, use the earliest passing stable perl as the default revision.
Nicholas Clark [Sat, 1 Oct 2011 15:37:52 +0000 (17:37 +0200)]
In bisect.pl, use the earliest passing stable perl as the default revision.

This is better than defaulting the start revision to any particular fixed
revision, as it handles most "new" syntax gracefully, instead of forcing the
user to work out what minimum version is required to run their testcase.

9 years agohandy.h: Add comments, pod change
Karl Williamson [Fri, 30 Sep 2011 14:36:57 +0000 (08:36 -0600)]
handy.h: Add comments, pod change

9 years agohandy.h: Improve definition of FITS_IN_8_BITS
Karl Williamson [Wed, 28 Sep 2011 21:39:03 +0000 (15:39 -0600)]
handy.h: Improve definition of FITS_IN_8_BITS

Unoptimized, the new definition takes signficantly fewer machine
instructions than the old one

9 years agohandy.h: Change '(foo) ? bar : 0 to 'foo && bar'
Karl Williamson [Wed, 28 Sep 2011 21:12:35 +0000 (15:12 -0600)]
handy.h: Change '(foo) ? bar : 0 to 'foo && bar'

This is clearer, and leads to better unoptimized code at least.
'bar' is a boolean

9 years agoutf8.h: Revise formal parameter name for clarity
Karl Williamson [Wed, 28 Sep 2011 21:09:36 +0000 (15:09 -0600)]
utf8.h: Revise formal parameter name for clarity

9 years agoutf8.h: Remove redundant checks
Karl Williamson [Wed, 28 Sep 2011 21:07:18 +0000 (15:07 -0600)]
utf8.h: Remove redundant checks

The macros that these call have been revised to do the same checks,
enhanced to not call the functions for all of Latin1, not just ASCII as
these did.  So the tests here are redundant.

9 years agohandy.h: Speed up isIDFIRST_utf8()
Karl Williamson [Wed, 28 Sep 2011 21:03:57 +0000 (15:03 -0600)]
handy.h: Speed up isIDFIRST_utf8()

This now takes advantage of the new table that mktables generates
to find out if a character is a legal start character in Perl's
definition.  Previously, it had to be looked up in two tables.

9 years agoAdd tests for isIDFirst
Karl Williamson [Wed, 28 Sep 2011 20:56:36 +0000 (14:56 -0600)]
Add tests for isIDFirst

9 years agoutf8.c: Add function to retrieve new _Perl_IDStart prop
Karl Williamson [Wed, 28 Sep 2011 15:44:52 +0000 (09:44 -0600)]
utf8.c: Add function to retrieve new _Perl_IDStart prop

9 years agomktables: Add Perl_IDStart property
Karl Williamson [Mon, 26 Sep 2011 20:46:00 +0000 (14:46 -0600)]
mktables: Add Perl_IDStart property

This is a space/time trade-off.  We add a table that is compiled to
calculate what Perl wants for a character to be the beginning of an
identifier.  This will enable us to not have to take the && of two
tables.

9 years agoComment-only nits
Karl Williamson [Wed, 28 Sep 2011 02:29:28 +0000 (20:29 -0600)]
Comment-only nits

9 years agohandy.h: Add missing isASCII_L1 macro
Karl Williamson [Mon, 26 Sep 2011 14:55:14 +0000 (08:55 -0600)]
handy.h: Add missing isASCII_L1 macro

This macro is in the pod, but never got defined.

9 years agohandy.h: Don't call _utf8 fcns if Latin1
Karl Williamson [Sat, 24 Sep 2011 21:31:33 +0000 (15:31 -0600)]
handy.h: Don't call _utf8 fcns if Latin1

This patch avoids the overhead of calling eg. is_utf8_alpha() on Latin1
inputs. The result is known to Perl's core, and this can avoid a swash
load.

9 years agohandy.h: Don't call _utf8 fcns if ASCII
Karl Williamson [Mon, 26 Sep 2011 19:30:40 +0000 (13:30 -0600)]
handy.h: Don't call _utf8 fcns if ASCII

This patch avoids the overhead of calling eg. is_utf8_alpha() on ASCII
inputs. The result is known to Perl's core, and this can avoid a swash
load.

9 years agoutf8.c: Remove (mostly) redundant test
Karl Williamson [Sat, 24 Sep 2011 21:17:33 +0000 (15:17 -0600)]
utf8.c: Remove (mostly) redundant test

The swashes already have the underscore, so this test is redundant.  It
does save some time for this character to avoid having to go out and
load the swash, but why just the underscore?  In fact an earlier commit
changed the macro that most people should use to access this function to
not even call it for the underscore.

9 years agohandy.h: Don't call _uni fcns if have applicable macro
Karl Williamson [Sat, 24 Sep 2011 21:10:01 +0000 (15:10 -0600)]
handy.h: Don't call _uni fcns if have applicable macro

This patch avoids the overhead of calling eg. is_uni_alpha() if the
result is known to Perl's core.  This can avoid a swash load.

9 years agoDon't use swash to find cntrls
Karl Williamson [Sat, 24 Sep 2011 19:23:21 +0000 (13:23 -0600)]
Don't use swash to find cntrls

Unicode stability policy guarantees that no code points will ever be
added to the control characters beyond those already in it.

All such characters are in the Latin1 range, and so the Perl core
already knows which ones those are, and so there is no need to go out to
disk and create a swash for these.

9 years agoutf8.c: Use less confusing property name
Karl Williamson [Sat, 24 Sep 2011 18:34:33 +0000 (12:34 -0600)]
utf8.c: Use less confusing property name

The XPerlSpace is less confusing than SpacePerl (at least to me).  It
means take PerlSpace and extend it beyond ASCII.

9 years agoNo need for swashes for properties that are ASCII-only
Karl Williamson [Sat, 24 Sep 2011 18:19:42 +0000 (12:19 -0600)]
No need for swashes for properties that are ASCII-only

These three properties are restricted to being true only for ASCII
characters.  That information is compiled into Perl, so no need to
create swashes for them.

9 years agoNo need for swashes for computing if ASCII
Karl Williamson [Sat, 24 Sep 2011 18:05:25 +0000 (12:05 -0600)]
No need for swashes for computing if ASCII

This information is trivially computed via the macro, no need to go out
to disk and store a swash for this.

9 years agohandy.h: No need to call fcns to compute if ASCII
Karl Williamson [Sat, 24 Sep 2011 17:56:40 +0000 (11:56 -0600)]
handy.h: No need to call fcns to compute if ASCII

Only the characters whose ordinals are 0-127 are ASCII.  This is
trivially computed by the macro, so no need to call is_uni_ascii() to do
this.  Also, since ASCII characters are the same when represented in
utf8 or not, the utf8 function call is also superfluous.

9 years agohandy.h: Simplify isASCII definition
Karl Williamson [Sat, 24 Sep 2011 17:46:54 +0000 (11:46 -0600)]
handy.h: Simplify isASCII definition

Thus retains essentially the same definition for EBCDIC platforms, but
substitutes a simpler one for ASCII platforms.  On my system, the new
definition compiles to about half the assembly instructions that the old
one did (non-optimized)

A bomb-proof definition of ASCII is to make sure that the value is
unsigned in the largest possible unsigned for the platform so there is
no possible loss of information, and then the ord  must be < 128.

9 years agohandy.h: refactor FITS_IN_8_BITS defn
Karl Williamson [Sat, 24 Sep 2011 17:42:10 +0000 (11:42 -0600)]
handy.h: refactor FITS_IN_8_BITS defn

This creates a #define for the platforms widest UV, and then uses this
in the FITS_IN_8ITS definition, instead of #ifdef'ing that.  This will
be useful in future commits.

9 years agohandy.h: clarify, typos in comment
Karl Williamson [Sat, 24 Sep 2011 17:29:09 +0000 (11:29 -0600)]
handy.h: clarify, typos in comment

9 years agoMore documenting that \p{} defined only for <= U+10FFF
Karl Williamson [Wed, 28 Sep 2011 15:36:25 +0000 (09:36 -0600)]
More documenting that \p{} defined only for <= U+10FFF

9 years agoutf8.c: Call new function invlist_invert_prop()
Karl Williamson [Wed, 28 Sep 2011 15:14:52 +0000 (09:14 -0600)]
utf8.c: Call new function invlist_invert_prop()

This new function is now potentially called.  However, there is no data file
or other circumstances which currently cause this path to get executed.

9 years agoregcomp.c: Add invlist_invert_prop()
Karl Williamson [Wed, 28 Sep 2011 04:14:29 +0000 (22:14 -0600)]
regcomp.c: Add invlist_invert_prop()

This new function inverts a Unicode property.  A regular inversion
doesn't work because it operates on the whole of the code space, and
Unicode property inversions don't invert above-Unicode code points.

This does for inversion lists, what an earlier commit did for swashes.
This function is currently not called by anyone.

9 years agoperlunicode, perluniprops: \p{Title} is Perl extension
Karl Williamson [Wed, 28 Sep 2011 21:55:19 +0000 (15:55 -0600)]
perlunicode, perluniprops: \p{Title} is Perl extension

This property is not official Unicode, and so should be documented by
us.

9 years agoRevise diagnostic text
Karl Williamson [Wed, 28 Sep 2011 01:20:19 +0000 (19:20 -0600)]
Revise diagnostic text

I believe that the new wording is clearer than the older, which I wrote.

9 years agoregexec.c: Avoid hard-coded utf8 tests for EBCDIC
Karl Williamson [Mon, 26 Sep 2011 19:24:08 +0000 (13:24 -0600)]
regexec.c: Avoid hard-coded utf8 tests for EBCDIC

When a swash is loaded, generally it is checked for sanity with an
assert().  The strings used are hard-coded utf8 strings, which will be
different in EBCDIC, and hence will fail.  I haven't figured out a
simple way to get compile-time utf8 vs utfebcdic strings, but we can
just skip the check in EBCDIC builds

9 years agoregcomp.c: Add assertion
Karl Williamson [Wed, 28 Sep 2011 04:18:20 +0000 (22:18 -0600)]
regcomp.c: Add assertion

This is to guard against misuse of the functions.  There is no guard
currently in the underlying Perl functions to lengthening a string
beyond the capacity to hold it.

9 years agoutf8.c: White space only
Karl Williamson [Wed, 28 Sep 2011 02:25:42 +0000 (20:25 -0600)]
utf8.c: White space only

This indents a block of code to match being in a newly created block

9 years agoutf8.c: Don't invert beyond-Unicode code points
Karl Williamson [Wed, 28 Sep 2011 01:36:35 +0000 (19:36 -0600)]
utf8.c: Don't invert beyond-Unicode code points

The Unicode properties are defined only on Unicode code points.  In the
past, this meant all property matches would fail for non-Unicode code
points.  However, starting with 5.15.1 some properties do succeed.  This
restores the previous behavior.

9 years agoregexec.c: Add assertion check
Karl Williamson [Sat, 24 Sep 2011 21:42:14 +0000 (15:42 -0600)]
regexec.c: Add assertion check

This makes sure before there is a segfault that the is_() functions
actually have the side effect that this expects.

9 years agomk_PL_charclass.pl: Accept Unicode 6.1 syntax
Karl Williamson [Fri, 30 Sep 2011 18:04:09 +0000 (12:04 -0600)]
mk_PL_charclass.pl: Accept Unicode 6.1 syntax

The file read by this has a slightly changed format in 6.1

9 years agomk_PL_charclass.pl: Revise comments, gen'd header
Karl Williamson [Fri, 30 Sep 2011 17:15:06 +0000 (11:15 -0600)]
mk_PL_charclass.pl: Revise comments, gen'd header

9 years agobisect-runner.pl should "skip" if --force-manifest detects changes.
Nicholas Clark [Sat, 1 Oct 2011 15:00:57 +0000 (17:00 +0200)]
bisect-runner.pl should "skip" if --force-manifest detects changes.

9 years agoTeach bisect-runner.pl how to build perl back to perl-5.000.
Nicholas Clark [Sat, 1 Oct 2011 14:36:19 +0000 (16:36 +0200)]
Teach bisect-runner.pl how to build perl back to perl-5.000.

It's unlikely that x86_64 Linux will ever be able to build extentions for
versions before e1666bf5602ae794 which upgraded MakeMaker to 3.7, although
there are still other problems at that commit which we don't (yet) work round.
The earliest released version that does build extensions is 5.002

For 5.002 we need to patch perl.c to avoid double calls to fclose() in the
-e handling code.
For 5.001 we need to force -Dusenm.
For 5.000 we need to patch Configure to allow spaces in -D, and to correctly
conclude that struct dirent does *not* contain a d_namlen member.

9 years agoAdd options --force-manifest and --test-build to bisect.pl
Nicholas Clark [Sat, 1 Oct 2011 14:23:41 +0000 (16:23 +0200)]
Add options --force-manifest and --test-build to bisect.pl

--force-manifest touches any files in MANIFEST that are missing. This avoids
hanging on 5.004 or earlier (where Configure's stdin is a tty) when Configure
detects the missing files and asks you if you want to stop. It's also useful
on 5.005 or later if you don't want to treat missing files as a "skip".
--test-build changes behaviour to treat failing to build the target exectuable
as a "fail", instead of a "skip".

9 years ago[perl #99984] Incorrect errmsg with our $::é
Father Chrysostomos [Sat, 1 Oct 2011 13:30:35 +0000 (06:30 -0700)]
[perl #99984] Incorrect errmsg with our $::é

Having PL_parser->error_count set to non-zero when utf8_heavy.pl tries
to do() one of its swashes results in ‘Compilation error’ being placed
in $@ during the do, even if it was successful.  This patch sets the
error_count to 0 before calling SWASHNEW, to prevent that.  It uses
SAVEI8, to make sure it is restored on scope exit.

9 years agoRegen Configure and friends
H.Merijn Brand [Sat, 1 Oct 2011 11:25:30 +0000 (13:25 +0200)]
Regen Configure and friends

After backporting Nicholas' work and slimming down metaconfig.h

9 years agoAdd more x-y aliases for x_y targets in Makefile
H.Merijn Brand [Sat, 1 Oct 2011 11:24:16 +0000 (13:24 +0200)]
Add more x-y aliases for x_y targets in Makefile

Consistently make test_prep identical to test-prep
for all x-y and x_y targets.

9 years agoAvoid bisect-runner.pl hanging on pre-5.004 if a file in MANIFEST is missing.
Nicholas Clark [Sat, 1 Oct 2011 08:36:11 +0000 (10:36 +0200)]
Avoid bisect-runner.pl hanging on pre-5.004 if a file in MANIFEST is missing.

9 years agoRestore the package name to overload errors; fix crash
Father Chrysostomos [Sat, 1 Oct 2011 01:27:58 +0000 (18:27 -0700)]
Restore the package name to overload errors; fix crash

Commit bfcb351493b (which was backported to 5.8.8) caused these error
messages always to mention the overload package, instead of the pack-
age involved:

Can't resolve method "foo" overloading "+" in package "baz"
Stub found while resolving method "foo" overloading "+" in package "baz"

This commit fixes that.  A compiler warning alerted me to the possi-
bility of HvNAME being null, so I wrote a small test for that, found
that it crashed, and incorporated the fix for the crash into the same
commit (since it’s the same line of code).

9 years agoExport DynaLoader symbols from libperl again
Reini Urban [Tue, 27 Sep 2011 11:45:37 +0000 (06:45 -0500)]
Export DynaLoader symbols from libperl again

With 5.15.2 and the new xubpp, DynaLoader symbols were XS_INTERNAL, before
they were effectively XS_EXTERNAL. This broke B::C and possibly other
embedded apps which link to DynaLoader functions.

9 years agoTo build perl-5.003 bisect-runner.pl needs to force a value for trnl.
Nicholas Clark [Fri, 30 Sep 2011 20:49:14 +0000 (22:49 +0200)]
To build perl-5.003 bisect-runner.pl needs to force a value for trnl.

Without this the current makedepend will hang waiting on stdin.
Additionally, when bisecting this far back we need to watch out for the
//depot/perlext/Compiler branch, which has no Configure, patchlevel.h or
other perl source, but may be checked out by the bisect, as it is the second
parent of a8581515f26a081f. If the file Configure is missing, we exit 125
to signal a skip.

9 years agoIn bisect-runner.pl, don't close Configure's STDIN for 5.004
Nicholas Clark [Fri, 30 Sep 2011 08:29:17 +0000 (10:29 +0200)]
In bisect-runner.pl, don't close Configure's STDIN for 5.004

Before commit dfe9444ca7881e71, Configure would refuse to run if STDIN was
not a tty. With that commit, the tty requirement was dropped for -de and -dE.

Change the default start in bisect.pl from perl-5.005 to perl-5.004.

9 years agoAdd a --match option to bisect.pl, to locate source code changes.
Nicholas Clark [Fri, 30 Sep 2011 08:11:58 +0000 (10:11 +0200)]
Add a --match option to bisect.pl, to locate source code changes.

9 years agoIn bisect-runner.pl, refactor the reporting code into report_and_exit().
Nicholas Clark [Fri, 30 Sep 2011 06:43:49 +0000 (08:43 +0200)]
In bisect-runner.pl, refactor the reporting code into report_and_exit().

9 years agobisect-runner.pl must clean up, even if it's skipping.
Nicholas Clark [Fri, 30 Sep 2011 06:29:05 +0000 (08:29 +0200)]
bisect-runner.pl must clean up, even if it's skipping.

It modifies makedepend.SH before running Configure, and a failed build may
well modify other files. The bisect run will fail if git can't checkout
the next revision to test because a file is locally modified.

9 years agobisect.pl should still print the time taken if it fails.
Nicholas Clark [Fri, 30 Sep 2011 06:06:35 +0000 (08:06 +0200)]
bisect.pl should still print the time taken if it fails.

(Bisect runs can legitimately return failure for various reasons, such as if
"There are only 'skip'ped commits left to test.")

Add an editor block, and convert the only tabs to spaces.