This is a live mirror of the Perl 5 development currently hosted at
11 years agotoke.c: S_scan_inputsymbol, initial GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 21:34:05 +0000 (18:34 -0300)]
toke.c: S_scan_inputsymbol, initial GV-related UTF8 cleanup

11 years agotoke.c: S_checkcomma, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 21:32:19 +0000 (18:32 -0300)]
toke.c: S_checkcomma, GV-related UTF8 cleanup

11 years agotoke.c: yylex, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 21:26:51 +0000 (18:26 -0300)]
toke.c: yylex, GV-related UTF8 cleanup

11 years agotoke.c: S_find_in_my_stash, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 21:09:03 +0000 (18:09 -0300)]
toke.c: S_find_in_my_stash, GV-related UTF8 cleanup

11 years agotoke.c: S_intuit_method, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 20:29:44 +0000 (17:29 -0300)]
toke.c: S_intuit_method, GV-related UTF8 cleanup

11 years agotoke.c: S_intuit_more, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 20:16:15 +0000 (17:16 -0300)]
toke.c: S_intuit_more, GV-related UTF8 cleanup

11 years agotoke.c: S_force_ident, GV-related UTF8 cleanup
Brian Fraser [Sat, 23 Jul 2011 20:03:18 +0000 (17:03 -0300)]
toke.c: S_force_ident, GV-related UTF8 cleanup

11 years agopp.c: pp_rv2gv UTF8 cleanup.
Brian Fraser [Sat, 23 Jul 2011 19:54:00 +0000 (16:54 -0300)]
pp.c: pp_rv2gv UTF8 cleanup.

11 years agoMerge multi and flags params to gv_init_*
Father Chrysostomos [Sun, 2 Oct 2011 20:57:19 +0000 (13:57 -0700)]
Merge multi and flags params to gv_init_*

Since multi is a boolean (even though it’s typed as an int), there is
no need to have a separate parameter.  We can just use a flag bit.

11 years agogv.c: Initial gv_fetchpvn_flags and gv_stashpvn UTF8 cleanup
Brian Fraser [Sat, 24 Sep 2011 18:57:27 +0000 (11:57 -0700)]
gv.c: Initial gv_fetchpvn_flags and gv_stashpvn UTF8 cleanup

Now that a glob can be initialized and fetched in UTF-8,
the next commit will introduce some changes in toke.c to
actually test this.

Committer’s note: To keep tests passing I had to incorporate
the toke.c:S_pending_ident changes in the same patch.

11 years Disable the UTF8 downgrade when unnecessary
Father Chrysostomos [Sun, 25 Sep 2011 00:58:16 +0000 (17:58 -0700)] Disable the UTF8 downgrade when unnecessary

The downgrade bug that has to imitate is about to be fixed
in the next commit.  The bug workaround is itself a bug if the bug it
is trying to work around is not present.

11 years agoFix thinko in hek_eq_pvn_flags
Father Chrysostomos [Sat, 24 Sep 2011 13:29:10 +0000 (06:29 -0700)]
Fix thinko in hek_eq_pvn_flags

Doing memEQ(str1, str2, len2) without checking the length
first will cause memEQ("forth","fort"...) to compare equal and
memEQ("fort","forth"...) to read unallocated memory.

This was only a potential future problem, as none of the callers reach
this branch.

11 years agohv.c: Stash-related UTF-8 cleanup.
Brian Fraser [Sat, 23 Jul 2011 19:51:54 +0000 (16:51 -0300)]
hv.c: Stash-related UTF-8 cleanup.

This adds a new static function to hv.c, hek_eq_pvn_flags,
which replaces several memEQs.

It also cleans up hv_name_set and has the relevant calls
to hv_common and friends made UTF-8 aware.

Finally, it changes share_hek() to modify the hash passed
in if the pv was modified when downgrading.

11 years agogv.c: gv_name_set and gv_init_(etc) now initialize the GV's name as UTF-8 if passed...
Brian Fraser [Tue, 5 Jul 2011 10:00:02 +0000 (07:00 -0300)]
gv.c: gv_name_set and gv_init_(etc) now initialize the GV's name as UTF-8 if passed the UTF8 flag.

newCONSTSUB is still unclean however, so constant subs are
still generated under a wrong name.

gv_fullname4 is also UTF-8 aware now; While that should've gotten
it's own commit and tests, it's not possible to test the
UTF-8 part without the gv_init changes, and it's not possible
to test the gv_init changes without gv_fullname4.
Chicken and egg, as it were. So let's compromise and
wait for the relevant tests once globs can be intiialized as
UTF-8 from the Perl level without XS magic.

11 years agoSvUTF8() for globs.
Brian Fraser [Mon, 18 Jul 2011 16:36:09 +0000 (17:36 +0100)]
SvUTF8() for globs.

This turns on the GV's UTF8 flag in sv.c when the GV is stringified.
This works the same way overloading and references work, in that the
SvUTF8 flag is only valid immediately after SvPV.

For Nick's much more detailed explanation, see

11 years agoRestore newGVgen to perlapi.pod
Father Chrysostomos [Sat, 24 Sep 2011 12:40:41 +0000 (05:40 -0700)]
Restore newGVgen to perlapi.pod

11 years agogv.c: newGVgen_flags and a flags parameter for gv_get_super_pkg.
Brian Fraser [Sun, 2 Oct 2011 05:14:50 +0000 (22:14 -0700)]
gv.c: newGVgen_flags and a flags parameter for gv_get_super_pkg.

11 years agoRemove method param from gv_autoload_*
Father Chrysostomos [Sun, 2 Oct 2011 05:14:19 +0000 (22:14 -0700)]
Remove method param from gv_autoload_*

method is a boolean flag (typed I32, but used as a boolean) added by
commit 54310121b442.

These new gv_autoload_* functions have a flags parameter, so there’s
no reason for this extra effective bool.  We can just use a flag bit.

11 years agoRemove 4 from new gv_autoload4_(sv|pvn?) functions
Father Chrysostomos [Sun, 2 Oct 2011 05:13:26 +0000 (22:13 -0700)]
Remove 4 from new gv_autoload4_(sv|pvn?) functions

The 4 was added in commit 54310121b442 (inseparable changes during
5.003/4 developement), presumably the ‘Don't look up &AUTOLOAD in @ISA
when calling plain function’ part.

Before that, gv_autoload had three arguments, so the 4 indicated the
new version (with the method argument).

Since these new functions don’t all have four arguments, and since
they have a new naming convention, there is not reason for the 4.

11 years agoRestore gv_autoload4 to perlapi.pod
Father Chrysostomos [Sat, 24 Sep 2011 03:43:32 +0000 (20:43 -0700)]
Restore gv_autoload4 to perlapi.pod

Even if it’s not documented (which I hope to rectify), it should
still continue to be listed in perlapi.

11 years agogv.c: Added gv_autoload4_(sv|pv|pvn)
Brian Fraser [Sun, 2 Oct 2011 05:12:18 +0000 (22:12 -0700)]
gv.c: Added gv_autoload4_(sv|pv|pvn)

11 years agogv.c: Make Gv_AMupdate use gv_fetchmethod_sv_flags
Brian Fraser [Sun, 2 Oct 2011 05:11:42 +0000 (22:11 -0700)]
gv.c: Make Gv_AMupdate use gv_fetchmethod_sv_flags

11 years agogv.c: Added gv_fetchmethod_(sv|pv|pvn)_flags.
Brian Fraser [Tue, 5 Jul 2011 07:37:42 +0000 (04:37 -0300)]
gv.c: Added gv_fetchmethod_(sv|pv|pvn)_flags.

In addition from taking a flags parameter, it also takes the
length of the method; This will eventually make method
lookup nul-clean.

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

It was not doing the sanity check for all three functions.

11 years agoRestore gv_fetchmeth_autoload to perlapi.pod
Father Chrysostomos [Fri, 23 Sep 2011 03:42:33 +0000 (20:42 -0700)]
Restore gv_fetchmeth_autoload to perlapi.pod

11 years agogv.c: Added gv_fetchmeth_(sv|pv|pvn)_autoload.
Brian Fraser [Tue, 5 Jul 2011 06:26:09 +0000 (03:26 -0300)]
gv.c: Added gv_fetchmeth_(sv|pv|pvn)_autoload.

11 years agoRemove comment from hv.c that no longer applies
Father Chrysostomos [Wed, 21 Sep 2011 00:37:38 +0000 (17:37 -0700)]
Remove comment from hv.c that no longer applies

11 years agoDocument and apiify hv name length/utf8 macros
Father Chrysostomos [Tue, 20 Sep 2011 22:39:32 +0000 (15:39 -0700)]
Document and apiify hv name length/utf8 macros

11 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.

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

11 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.

11 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.

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

11 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.

11 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.

11 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.

11 years agoIn, 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, if getconf exists, use it to report the number of CPUs.

Thanks to David Leadbeater for the suggestion.

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

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

11 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


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

11 years agoRemove whitespace errors from
Nicholas Clark [Wed, 5 Oct 2011 19:38:23 +0000 (21:38 +0200)]
Remove whitespace errors from

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

11 years now runs all build commands with STDIN of /dev/null
Nicholas Clark [Wed, 5 Oct 2011 19:25:47 +0000 (21:25 +0200)] 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

11 years should remove the stdin-is-a-tty test completely.
Nicholas Clark [Wed, 5 Oct 2011 19:04:01 +0000 (21:04 +0200)] 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 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.

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

Add a sanity test to catch this case.

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

11 years 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)] 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 imported from the "future").

11 years needs to inline $compile into the test for malloc.h
Nicholas Clark [Wed, 5 Oct 2011 14:51:16 +0000 (16:51 +0200)] 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, can build all
extensions back to perl-5.002.

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

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

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

11 years agoIn, patch Configure to test-compile #include <malloc.h>
Nicholas Clark [Wed, 5 Oct 2011 11:34:10 +0000 (13:34 +0200)]
In, 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, can build perl-5.8.0 on FreeBSD.

11 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


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

11 years agoIn always use blead's hitnts/
Nicholas Clark [Wed, 5 Oct 2011 10:39:40 +0000 (12:39 +0200)]
In always use blead's hitnts/

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.

11 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

11 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".

11 years agoIn, only force Configure's libpth on x86_64 Linux.
Nicholas Clark [Tue, 4 Oct 2011 20:36:38 +0000 (22:36 +0200)]
In, 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.

11 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

11 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.

11 years needs to patch ext/IPC/SysV/SysV.xs for "newer" Linux.
Nicholas Clark [Mon, 3 Oct 2011 19:11:34 +0000 (21:11 +0200)] 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)

11 years should check for t/perl when building test_prep.
Nicholas Clark [Mon, 3 Oct 2011 17:49:18 +0000 (19:49 +0200)] 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.

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

11 years agoDocumentation for and
Nicholas Clark [Mon, 3 Oct 2011 15:41:18 +0000 (17:41 +0200)]
Documentation for and

11 years agoIn, 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, 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.

11 years agoIn, support matching on files generated by the build.
Nicholas Clark [Mon, 3 Oct 2011 11:23:44 +0000 (13:23 +0200)]
In, 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.

11 years agoIf patching fails, should report the name of the file.
Nicholas Clark [Mon, 3 Oct 2011 09:39:58 +0000 (11:39 +0200)]
If patching fails, 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.

11 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


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

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.

11 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

11 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

11 years must use Fcntl::S_IMODE() on the raw output from stat.
Nicholas Clark [Sun, 2 Oct 2011 20:26:14 +0000 (22:26 +0200)] 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.

11 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


  0.79  Sun Oct  2 20:31:01 2011
    - pod: [ #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.

11 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


  2011-10-02   Gisle Aas <>

   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
      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)

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

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

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

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

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

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

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

Add a --check-args option to to validate the arguments that doesn't know how to check (else the automatic start detection
will get very confused by invalid arguments). Switch 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.

11 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

11 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.

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

11 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.

11 years agoIn, use the earliest passing stable perl as the default revision.
Nicholas Clark [Sat, 1 Oct 2011 15:37:52 +0000 (17:37 +0200)]
In, 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.

11 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

11 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

11 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

11 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

11 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.

11 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.

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

11 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

11 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

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

11 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.

11 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

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.