This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
5 years agoadd parallel support 4 Win32 dmake-COREDIR parallelism part 2
Daniel Dragan [Sat, 15 Aug 2015 09:24:06 +0000 (05:24 -0400)]
add parallel support 4 Win32 dmake-COREDIR parallelism part 2

-defer the mass copy of headers to COREDIR until XS build time
 and dont use COREDIR for building miniperl interp or perl interp, more
 thing to do in parallel this way and 1 less path to search by the CC
-config_h.PL requires config.h to be in COREDIR, this XCOPY in CONFIGPM
 targ is where COREDIR is created if it doesnt exist already
-remove a bunch of XCOPY'es, copy the headers in 1 place only, and dont
 copy them unless they change based on timestamps
-the DYNALOADER dep already contains
 "..\make_ext.pl ..\lib\buildcustomize.pl $(CONFIGPM) $(HAVE_COREDIR)" dont
 specify them again in Extensions and Extensions_reonly, this probably
 reduces the size of dep graph in dmake, since dmake explodes the graph and
 checks the outline of the graph/tree very inefficiently in parallel mode
 (architectural problem with dmake)
-delete pdb files in root, otherwise switching VC version will make the
 next cl.exe error out that it can't write to the pdb file due to version
 numbers in the pdb file
-reorder core .c files in a blend of VC and GCC time order, this reduces
 a 1:08 mins time to do "dmake -P9 ../perl522.dll" to 0:54 mins on 8 core
 with GCC, see details in #123867

5 years agoadd parallel support 4 Win32 dmake building part 1
Daniel Dragan [Sat, 15 Aug 2015 20:03:49 +0000 (16:03 -0400)]
add parallel support 4 Win32 dmake building part 1

-if building a 32 bit Perl, with a 64bit dmake, force
 PROCESSOR_ARCHITECTURE to x86, otherwise the next couple macros will
 try to build a 64 bit perl with 32 bit CCs
-PDBOUT is required to run multiple VC cl.exe processes, otherwise all
 VC cl.exe processes will error out trying to lock and write to a
 file called "vc*0.pdb", PDBOUT is empty for GCC builds since they dont
 have PDB files
-to reduce excess IO calls checking for miniperl.exe plus remove a
 "Found file corresponding to virtual target" warning that dmake emits,
 make this makefile unaware that miniperl.exe exists. dmake has a very bad
 exponential number of IO/stat() calls for every target that is yet
 unbuilt, see procmon logs in [perl #123854], so instead of a stat on
 ../miniperl.exe, then ../lib/buildcustomize.pl, it will be just a stat on
 ../lib/buildcustomize.pl
-remove makefile awareness of ..\lib\Config_heavy.pl,
 if ..\lib\Config_heavy.pl is ever updated, so is ..\lib\Config.pm
 less IO calls for dmake, see also commit 962e59f394
-to break up the sequential nature of this makefile, allow (XS) Extensions
 to build, before (AKA parallel with) perl5**.dll and perl.exe are built.
 This is achieved by running makedef.pl very early, and generating
 perl5**.lib/libperl5**.a from the def file, and NOT generating
 perl5**.lib/libperl5**.a from perl5**.dll at link time of perl5**.dll.
 The conquence of this is, declspec(dllexport) is now unusable, but exports
 should be centrally managed anyways (embed.fnc/etc) so this isn't a big
 issue.
-EUMM makefiles shouldn't be subject to parallelism, untested and disable
 for now, plus creating PLMAKE allows "dmake -n" to work for diagnosing
 this makefile
-slim down all target. Extensions* and UNIDATAFILES now know how to build
 themselves, the parallel nature says you can't rely on left to right
 execution of deps in a parent node to make a child (dep) node build
-miniperl.exe used to be unbuildable from a clean tree except from all
 target, since miniperl.exe didn't depend on mini config.h. Also mini dir
 can't be a target, since each .obj built will dirty the mini dir's time
 stamp and infinite loop happens, instead use a .exists file
-dmake rescans for all outstanding targets, at each recipe line to run,
 this early in the build process, there are an enormous amount of files to
 test for, so the echos are very slow, 350ms each, so combine as many of
 the lines of mini/.exists AKA mini config.h together as possible.  ".IF"
 can't be put inside "one line", so not all lines were merged. Shell "if"
 could be used to further group the echos but this enough to make the pause
 /cpu spining not really noticable. USE_CPLUSPLUS contains an unrolled line
 (the #endif) on both sides. See also procmon logs in [perl #123854]
-perllib.obj/.o needs perllibst.h which is built by miniperl+a script,
 perllibst.h target doesn't need any Extensions*, so perllib.obj is still
 quick to build
-perldll.def doesn't need perllibst.h since makedef.pl uses
 $Config{static_ext} to find boot xsubs to export, makedef.pl does not
 read perllibst.h, remove perllibst.h for more parallelism/less things to
 build before perldll.def runs, and therefore Extensions (XS) starts to
 run quicker, and Extensions (XS) is the longest target to build
-perlmain and perlmainst .obj/.o needs full perl headers to compile, they
 aren't like generate_uudmap.exe and perlglob.exe which are perlapi unaware
-perl.exe doesn't need perl5**.dll to build, just the imp lib to
 perl5**.dll, perl.exe is in the same category as XS modules, more
 parallelism
-ppport.h isn't needed in blead perl, since blead is the newest perl in the
 world, this allows Extensions (XS) to run sooner, ppport.h is replaced by
 a dummy empty file, delete ppport.h from final installed CORE dir during
 installation so the dummy ppport.h doesn't wind up in installed perl and isnt
 seen by CPAN XS modules during their building by the perl user after perl
 was build and installed, note mkppport script and mkppport.lst are unused
 in makefile.mk now
-break up the dependencies of all the Extensions* targets, static
 (just Win32CORE normally), dynamic XS and non-XS, these 3 run in parallel
 now, non-XS doesn't need perl5**.lib/.a or any C headers, just PP
 Config.pm
-DLL XS requires PP DynaLoader.pm for dl_findfile() otherwise
 Mkbootstrap.pm fatally errors, Mkbootstrap.pm could be revised to not load
 DynaLoader on Win32, since "    if ($Config{'dlsrc'} =~ /^dl_dld/){" is
 false, but this is the easier path right now
-DynaLoader requires module lib to build itself, but Extensions_nonxs
 happens to not need mod lib, so move where mod lib is built
-in utils target, change it so it can run with miniperl, more parallelism,
 pl2bat doesn't require full perl, the full perl stuff is from
 commit 3fe9a6f19e from 5.003 and no ML archive is available to explain why
 full perl was used instead of mini perl

-add 4 modules to buildcustomize so nonxs and xs build simultaneously

-remove ancient cruft from commit 26618a56da from 1997 from README.w32
 dmake is automatically set inside CFG_VARS today. OSRELEASE is irrelavent
 today, Perl doesn't use any of the defaults (like name of CC) from the
 maketool.

-Reduce 21 calls of "cmd.exe /x/d/c cd" by miniperl to just 1 by saving and
 reusing cwd. This reduced the amount of time to run
 "..\miniperl.exe -I..\lib -f ..\write_buildcustomize.pl .." from 312 ms
 to 62 ms elapsed time using timeit.exe for me.

5 years agomove Test dist from ./cpan to ./dist
Ricardo Signes [Sun, 6 Sep 2015 19:45:12 +0000 (15:45 -0400)]
move Test dist from ./cpan to ./dist

5 years agoMETA.* regen for moved Math-* dists
Ricardo Signes [Sun, 6 Sep 2015 19:41:46 +0000 (15:41 -0400)]
META.* regen for moved Math-* dists

5 years agomove Math-Big* from ./dist to ./cpan
Ricardo Signes [Sat, 5 Sep 2015 14:20:42 +0000 (10:20 -0400)]
move Math-Big* from ./dist to ./cpan

5 years agobump versions of perl modules updated in AmigaOS branch
Ricardo Signes [Sun, 6 Sep 2015 16:48:14 +0000 (12:48 -0400)]
bump versions of perl modules updated in AmigaOS branch

5 years agore/speed.t: increase watchdog timeout
David Mitchell [Sun, 6 Sep 2015 09:43:18 +0000 (10:43 +0100)]
re/speed.t: increase watchdog timeout

49bc8c204e5 added more tests to this file, increasing its execution time
threefold under ASAN. Increase the watchdog timeout proportionally,
to stop occasional smoke failures.

5 years agoRegenerated podcheck db: AmigaOS pedantic failures
Karl Williamson [Sat, 5 Sep 2015 17:24:20 +0000 (11:24 -0600)]
Regenerated podcheck db: AmigaOS pedantic failures

5 years agoFix a couple of pod issues
Karl Williamson [Sat, 5 Sep 2015 17:12:01 +0000 (11:12 -0600)]
Fix a couple of pod issues

5 years agoFix broken link in pod for Hash::Util::FieldHash
Karl Williamson [Sat, 5 Sep 2015 17:10:53 +0000 (11:10 -0600)]
Fix broken link in pod for Hash::Util::FieldHash

5 years agoMerge commit for amigos branch
Ricardo Signes [Sat, 5 Sep 2015 15:19:57 +0000 (11:19 -0400)]
Merge commit for amigos branch

5 years agoamigaos4: README.amiga
Andy Broad [Fri, 28 Aug 2015 00:47:25 +0000 (20:47 -0400)]
amigaos4: README.amiga

Complete rewrite since the old port was old.

5 years agoamigaos4: install scripts
Andy Broad [Fri, 14 Aug 2015 00:53:49 +0000 (20:53 -0400)]
amigaos4: install scripts

- needs different mode for shared objects (libraries)
- needs running the os-specific utility
- no hard links but symlinks

5 years agoamigaos4: no FD_CLOEXEC, no test
Andy Broad [Fri, 28 Aug 2015 12:38:27 +0000 (08:38 -0400)]
amigaos4: no FD_CLOEXEC, no test

5 years agoamigaos4: customized Socket Socket.xs
Andy Broad [Mon, 31 Aug 2015 23:14:21 +0000 (19:14 -0400)]
amigaos4: customized Socket Socket.xs

5 years agoamigaos4: customized Pod::Perldoc lib/Perldoc.pm
Andy Broad [Mon, 31 Aug 2015 23:14:07 +0000 (19:14 -0400)]
amigaos4: customized Pod::Perldoc lib/Perldoc.pm

5 years agoamigaos4: customized Compress-Raw-Zlib Zlib.xs
Andy Broad [Mon, 31 Aug 2015 23:13:38 +0000 (19:13 -0400)]
amigaos4: customized Compress-Raw-Zlib Zlib.xs

5 years agoamigaos4: cpan/Socket: needs INET_ADDRSTRLEN
Andy Broad [Fri, 14 Aug 2015 01:13:29 +0000 (21:13 -0400)]
amigaos4: cpan/Socket: needs INET_ADDRSTRLEN

Upstreamed: https://rt.cpan.org/Ticket/Display.html?id=106797

5 years agoamigaos4: cpan/Pod-Perldoc: different paging
Andy Broad [Fri, 14 Aug 2015 01:12:16 +0000 (21:12 -0400)]
amigaos4: cpan/Pod-Perldoc: different paging

Upstreamed: https://rt.cpan.org/Ticket/Display.html?id=106798

5 years agoamigaos4: cpan/Compress-Raw-Zlib: also __amigaos4__
Andy Broad [Sat, 22 Aug 2015 13:28:37 +0000 (09:28 -0400)]
amigaos4: cpan/Compress-Raw-Zlib: also __amigaos4__

Upstreamed: https://rt.cpan.org/Ticket/Display.html?id=106799

5 years agoamigaos4: dist/threads: no thread signal blocking
Andy Broad [Fri, 21 Aug 2015 21:09:15 +0000 (17:09 -0400)]
amigaos4: dist/threads: no thread signal blocking

5 years agoamigaos4: dist/PathTools/lib/File/Spec: add AmigaOS.pm
Andy Broad [Fri, 14 Aug 2015 01:17:44 +0000 (21:17 -0400)]
amigaos4: dist/PathTools/lib/File/Spec: add AmigaOS.pm

5 years agoamigaos4: dist/PathTools/Cwd: special env handling
Andy Broad [Fri, 14 Aug 2015 01:15:10 +0000 (21:15 -0400)]
amigaos4: dist/PathTools/Cwd: special env handling

5 years agoamigaos4: ext/POSIX: no fancy signals
Andy Broad [Tue, 1 Sep 2015 00:19:25 +0000 (20:19 -0400)]
amigaos4: ext/POSIX: no fancy signals

5 years agoamigaos4: ext/POSIX: no mkfifo
Andy Broad [Tue, 1 Sep 2015 00:19:10 +0000 (20:19 -0400)]
amigaos4: ext/POSIX: no mkfifo

5 years agoamigaos4: translate $^X to unix style
Andy Broad [Tue, 1 Sep 2015 22:39:42 +0000 (18:39 -0400)]
amigaos4: translate $^X to unix style

5 years agoamigaos4: neither sched_yield nor pthread_yield
Andy Broad [Fri, 21 Aug 2015 21:07:54 +0000 (17:07 -0400)]
amigaos4: neither sched_yield nor pthread_yield

Emulate using sleep(0).

5 years agoamigaos4: use afstat for fstat
Andy Broad [Thu, 20 Aug 2015 00:03:03 +0000 (20:03 -0400)]
amigaos4: use afstat for fstat

5 years agoamigaos4: random device name
Andy Broad [Sat, 15 Aug 2015 23:15:56 +0000 (19:15 -0400)]
amigaos4: random device name

5 years agoamigaos4: unlink of open/locked files will fail
Andy Broad [Mon, 31 Aug 2015 16:20:52 +0000 (12:20 -0400)]
amigaos4: unlink of open/locked files will fail

5 years agoamigaos4: avoid my_pclose
Andy Broad [Sat, 15 Aug 2015 22:31:49 +0000 (18:31 -0400)]
amigaos4: avoid my_pclose

5 years agoamigaos4: use my_popen from amigaos.c
Andy Broad [Sat, 22 Aug 2015 13:24:56 +0000 (09:24 -0400)]
amigaos4: use my_popen from amigaos.c

5 years agoamigaos4: avoid my_popen_list
Andy Broad [Sat, 22 Aug 2015 13:22:45 +0000 (09:22 -0400)]
amigaos4: avoid my_popen_list

5 years agoamigaos4: needs inplace edit backup file
Andy Broad [Sat, 22 Aug 2015 13:05:21 +0000 (09:05 -0400)]
amigaos4: needs inplace edit backup file

Use __amigaos4__ define instead of AMIGAOS.

5 years agoamigaos4: setenv magic should work with __amigaos4__
Andy Broad [Sat, 22 Aug 2015 13:08:30 +0000 (09:08 -0400)]
amigaos4: setenv magic should work with __amigaos4__

The code was protected with AMIGAOS which was AmigaOS 3.

5 years agoamigaos4: no env in main()
Andy Broad [Fri, 14 Aug 2015 02:09:41 +0000 (22:09 -0400)]
amigaos4: no env in main()

5 years agoamigaos4: unistd.h needs netinet/in.h
Andy Broad [Fri, 14 Aug 2015 02:08:12 +0000 (22:08 -0400)]
amigaos4: unistd.h needs netinet/in.h

5 years agoamigaos4: fork child handling
Andy Broad [Wed, 19 Aug 2015 16:39:24 +0000 (12:39 -0400)]
amigaos4: fork child handling

5 years agoamigaos4: use our own environ implementation
Andy Broad [Thu, 27 Aug 2015 13:31:34 +0000 (09:31 -0400)]
amigaos4: use our own environ implementation

5 years agoamigaos4: PERL_SYS_INIT_BODY and PERL_SYS_TERM_BODY
Andy Broad [Thu, 20 Aug 2015 00:06:06 +0000 (20:06 -0400)]
amigaos4: PERL_SYS_INIT_BODY and PERL_SYS_TERM_BODY

5 years agoamigaos4: use amigaos glue for exec(), system(), waitpid()
Andy Broad [Tue, 25 Aug 2015 23:56:51 +0000 (19:56 -0400)]
amigaos4: use amigaos glue for exec(), system(), waitpid()

5 years agoamigaos4: save and restore stdio handles around exec
Andy Broad [Tue, 25 Aug 2015 23:53:13 +0000 (19:53 -0400)]
amigaos4: save and restore stdio handles around exec

5 years agoamigaos4: clone differently
Andy Broad [Wed, 19 Aug 2015 16:29:54 +0000 (12:29 -0400)]
amigaos4: clone differently

5 years agoamigaos4: special post-exec trick needed
Andy Broad [Tue, 25 Aug 2015 23:55:42 +0000 (19:55 -0400)]
amigaos4: special post-exec trick needed

5 years agoamigaos4: exec returns I32
Andy Broad [Wed, 19 Aug 2015 16:35:24 +0000 (12:35 -0400)]
amigaos4: exec returns I32

Unlike UNIXish fork-exec, in amigaos forking is more like
starting a thread, the return code is more than a boolean.

5 years agoamigaos4: FD_CLOEXEC is defined but not implemented
Andy Broad [Wed, 26 Aug 2015 21:26:38 +0000 (17:26 -0400)]
amigaos4: FD_CLOEXEC is defined but not implemented

5 years agoamigaos4: WORD defined in exec/types.h
Andy Broad [Wed, 19 Aug 2015 16:31:16 +0000 (12:31 -0400)]
amigaos4: WORD defined in exec/types.h

5 years agoamigaos4: check that the errno indicates an error
Andy Broad [Wed, 19 Aug 2015 16:28:21 +0000 (12:28 -0400)]
amigaos4: check that the errno indicates an error

5 years agoamigaos4: copy the amigaos glue files to the top
Andy Broad [Sun, 16 Aug 2015 02:14:32 +0000 (22:14 -0400)]
amigaos4: copy the amigaos glue files to the top

Makes build process simpler.

5 years agoamigaos4: add amigaos the glue code
Andy Broad [Wed, 19 Aug 2015 14:01:39 +0000 (10:01 -0400)]
amigaos4: add amigaos the glue code

amigaos.c: pure amigaos code
amigaio.c: bridge code between perl and amigaos

5 years agoamigaos4: Makefile.SH workaround for shell bug
Andy Broad [Thu, 27 Aug 2015 22:32:35 +0000 (18:32 -0400)]
amigaos4: Makefile.SH workaround for shell bug

5 years agoamigaos4: flock unimplemented
Andy Broad [Thu, 20 Aug 2015 21:56:05 +0000 (17:56 -0400)]
amigaos4: flock unimplemented

The semantics of locking are very different: first you lock,
then you open.  (And for semaphore-like uses of files, you
use ... semaphores.)

5 years agoamigaos4: the Perl executable needs to be linked with -ldl
Andy Broad [Thu, 13 Aug 2015 23:19:31 +0000 (19:19 -0400)]
amigaos4: the Perl executable needs to be linked with -ldl

(but none of the other executables should be)

5 years agoamigaos4: do not build Amiga extensions in Win32
Andy Broad [Sat, 5 Sep 2015 00:56:23 +0000 (20:56 -0400)]
amigaos4: do not build Amiga extensions in Win32

Really.

5 years agoamigaos4: lib/.gitignore for the Amiga extensions
Andy Broad [Fri, 28 Aug 2015 11:54:31 +0000 (07:54 -0400)]
amigaos4: lib/.gitignore for the Amiga extensions

5 years agoamigaos4: Amiga extensions maintenance
Andy Broad [Thu, 27 Aug 2015 23:19:45 +0000 (19:19 -0400)]
amigaos4: Amiga extensions maintenance

5 years agoamigaos4: ppport.h for the AmigaOS extensions
Andy Broad [Fri, 28 Aug 2015 10:22:38 +0000 (06:22 -0400)]
amigaos4: ppport.h for the AmigaOS extensions

5 years agoamigaos4: detect the Amiga extensions
Andy Broad [Thu, 13 Aug 2015 23:12:23 +0000 (19:12 -0400)]
amigaos4: detect the Amiga extensions

5 years agoamigaos4: add Amiga::ARexx and Amiga::Exec
Andy Broad [Fri, 14 Aug 2015 01:04:20 +0000 (21:04 -0400)]
amigaos4: add Amiga::ARexx and Amiga::Exec

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.

5 years agoamigaos4: there is no /dev/tty but there is CONSOLE:
Andy Broad [Tue, 25 Aug 2015 02:06:14 +0000 (22:06 -0400)]
amigaos4: there is no /dev/tty but there is CONSOLE:

5 years agoamigaos4: config.sh, and new hints using the config
Andy Broad [Sun, 16 Aug 2015 02:27:47 +0000 (22:27 -0400)]
amigaos4: config.sh, and new hints using the config

5 years agoamigaos4: Configure: allow hinting sig_num_init
Andy Broad [Thu, 13 Aug 2015 23:11:27 +0000 (19:11 -0400)]
amigaos4: Configure: allow hinting sig_num_init

(And assumedly providing all the other related sig* values.)

5 years agoamigaos4: Configure: allow hinting d_procselfexe
Andy Broad [Thu, 13 Aug 2015 23:09:25 +0000 (19:09 -0400)]
amigaos4: Configure: allow hinting d_procselfexe

Trying to access /proc causes the system to try to mount such a thing.
(And there is no process file system in AmigaOS, anyway.)

5 years agoamigaos4: Configure: this test needs also alarm()
Andy Broad [Thu, 13 Aug 2015 23:08:31 +0000 (19:08 -0400)]
amigaos4: Configure: this test needs also alarm()

... which amigaos does not have.

5 years agoamigaos4: Configure: -fstack-protector* compiles but does not link
Andy Broad [Mon, 17 Aug 2015 11:18:04 +0000 (07:18 -0400)]
amigaos4: Configure: -fstack-protector* compiles but does not link

Now an explicit test, a more portable fix would test compile + link.
Trickier, though, because e.g. with AmigaOS 4 a particular option
is required for the failure to happen (-use-dynld).

5 years agoamigaos4: Configure; abc/pdksh bug workaround, hardwire the fieldn
Andy Broad [Thu, 13 Aug 2015 23:07:28 +0000 (19:07 -0400)]
amigaos4: Configure; abc/pdksh bug workaround, hardwire the fieldn

5 years agoamigaos4: Configure; the abc/pdksh shell evaluates \n in arguments
Andy Broad [Thu, 13 Aug 2015 23:03:39 +0000 (19:03 -0400)]
amigaos4: Configure; the abc/pdksh shell evaluates \n in arguments

For example, echo "a\bn" becomes

a
b

as opposed to

a\nb

causing broken shell commands with ``, but these \n are not really
needed, so we can remove them.

5 years agoamigaos4: Configure: the multiview is a good amigaos indicator
Andy Broad [Thu, 13 Aug 2015 23:02:39 +0000 (19:02 -0400)]
amigaos4: Configure: the multiview is a good amigaos indicator

5 years agoamigaos4: Configure: tr extra sanity check
Andy Broad [Sat, 15 Aug 2015 23:40:18 +0000 (19:40 -0400)]
amigaos4: Configure: tr extra sanity check

5 years agoamigaos4: Configure: /dev/null works, but test -c doesn't
Andy Broad [Thu, 13 Aug 2015 23:00:55 +0000 (19:00 -0400)]
amigaos4: Configure: /dev/null works, but test -c doesn't

5 years agot/op/utf8decode.t: Update tests from new source material
Karl Williamson [Fri, 4 Sep 2015 16:57:44 +0000 (10:57 -0600)]
t/op/utf8decode.t: Update tests from new source material

The website that these tests were based on has been updated, so the
tests here are updated to correspond.  The tests supplied are now for
every non-character.  He suggests that decoders not accept these, but
Perl currently does by default.

5 years agoFix potential flaw in 2 EBCDIC macros.
Karl Williamson [Wed, 26 Aug 2015 21:38:39 +0000 (15:38 -0600)]
Fix potential flaw in 2 EBCDIC macros.

It occurred to me in code reading that it was possible for these macros
to not give the correct result if passed a signed argument.

An earlier version of this commit was buggy.  Thanks to Yaroslav Kuzmin
for spotting that.

5 years agoutf8.h, utfebcdic.h: Add some assertions
Karl Williamson [Wed, 26 Aug 2015 21:35:05 +0000 (15:35 -0600)]
utf8.h, utfebcdic.h: Add some assertions

These will detect a array bounds error that occurs on EBCDIC machines,
and by including the assert on non-EBCDIC, we verify that the code
wouldn't fail when built on EBCDIC.

5 years agoutf8.h: Add comment; white space changes
Karl Williamson [Sat, 15 Aug 2015 18:53:17 +0000 (12:53 -0600)]
utf8.h: Add comment; white space changes

5 years agoSkip some code in a common case
Karl Williamson [Thu, 3 Sep 2015 00:24:38 +0000 (18:24 -0600)]
Skip some code in a common case

It's common to call this function to convert a code point to UTF-8 with
the flags parameter being 0, which means no checking of problematic code
points (above-Unicode etc) is done.  Add a check for flags being
non-zero before doing any such checking.

5 years agoporting/maintainers.t: Skip on EBCDIC
Karl Williamson [Fri, 4 Sep 2015 15:10:58 +0000 (09:10 -0600)]
porting/maintainers.t: Skip on EBCDIC

5 years agoutf8.h: Change definition of UTF8_IS_INVARIANT
Karl Williamson [Mon, 3 Aug 2015 03:21:25 +0000 (21:21 -0600)]
utf8.h: Change definition of UTF8_IS_INVARIANT

The new definition is simpler to read.

5 years agoChange EBCDIC macro definition
Karl Williamson [Sun, 2 Aug 2015 04:15:18 +0000 (22:15 -0600)]
Change EBCDIC macro definition

This changes the definition of isUTF8_POSSIBLY_PROBLEMATIC() on EBCDIC
platforms to use PL_charclass[] instead of PL_e2a[].  The new array is
more likely to be in the memory cache.

5 years agoChange EBCDIC macro definition
Karl Williamson [Sun, 2 Aug 2015 15:02:51 +0000 (09:02 -0600)]
Change EBCDIC macro definition

Prior to this commit UVCHR_SKIP() was defined the same in both ASCII and
EBCDIC, but they expanded to different things.  Now, they are defined
separately  -- to what they expand to, and the EBCDIC version is changed
when all expanded out to use PL_charclass[] instead of PL_e2a[].  The
new array is more likely to be in the memory cache.

5 years agoChange EBCDIC macro definition
Karl Williamson [Sat, 16 May 2015 16:43:40 +0000 (10:43 -0600)]
Change EBCDIC macro definition

Prior to this commit UVCHR_IS_INVARIANT() was defined the same in both
ASCII and EBCDIC, but they expanded to different things.  Now, they are
defined separately to what they expand to, and the EBCDIC version is
changed when all expanded out to use PL_charclass[] instead of PL_e2a[].
The new array is more likely to be in the memory cache.

5 years agoutf8.h: Change defn of UNI_IS_INVARIANT
Karl Williamson [Sat, 16 May 2015 16:31:19 +0000 (10:31 -0600)]
utf8.h: Change defn of UNI_IS_INVARIANT

This changes it to be isASCII(), instead of repeating the "special"
number 0x80.

5 years agoChange some UTF-EBCDIC macro handling defns
Karl Williamson [Fri, 4 Sep 2015 15:57:11 +0000 (09:57 -0600)]
Change some UTF-EBCDIC macro handling defns

This commit changes the definitions of some macros for UTF-8 handling on
EBCDIC platforms.  The previous definitions transformed the bytes into
I8 and did tests on the transformed values.  The change is to use
previously unused bits in l1_char_class_tab.h so the transform isn't
needed, and generally only one branch is.  These macros are called from
the inner loops of, for example, regex backtracking.

5 years agol1_char_class_tab.h: Add comments
Karl Williamson [Fri, 4 Sep 2015 15:55:33 +0000 (09:55 -0600)]
l1_char_class_tab.h: Add comments

This adds the I8 value (used for generating UTF-EBCDIC) for bytes where
it differs from the regular value on the EBCDIC portions of this header.
This value is useful in debugging.

5 years agol1_char_class_tab.h: Add bits for UTF-EBCDIC
Karl Williamson [Fri, 15 May 2015 20:23:12 +0000 (14:23 -0600)]
l1_char_class_tab.h: Add bits for UTF-EBCDIC

This is for the next commit.

5 years agoregen/mk_PL_charclass.pl: Refactor a print
Karl Williamson [Fri, 15 May 2015 20:21:25 +0000 (14:21 -0600)]
regen/mk_PL_charclass.pl: Refactor a print

This is in preparation for the next commits.

5 years agoRemove no longer used #define
Karl Williamson [Fri, 15 May 2015 20:49:21 +0000 (14:49 -0600)]
Remove no longer used #define

The previous commit removed all uses of this non-public #define.

5 years agoChange filter of problematic code points for EBCDIC
Karl Williamson [Fri, 15 May 2015 20:48:23 +0000 (14:48 -0600)]
Change filter of problematic code points for EBCDIC

There are three classes of problematic Unicode code points that may
require special handling.  Which code points are problematic is fairly
complicated, requiring lots of branches.  However, the smallest of them
is 0xD800, which means that most code points in modern use are below
them all, and a single test can be used to exclude just about everything
likely to be encountered.  The problem was that the way this test was
done on EBCDIC caused way too many things to pass and have to be checked
with the more complicated branches.  The digits 0-9 and some capital
letters were not filtered out, for example.  This commit changes the
EBCDIC test to transform into I8 (an array lookup), and this fixes it to
exclude things that shouldn't have passed before.

5 years agoAdd macro for converting Latin1 to UTF-8, and use it
Karl Williamson [Fri, 15 May 2015 16:59:54 +0000 (10:59 -0600)]
Add macro for converting Latin1 to UTF-8, and use it

This adds a macro that converts a code point in the ASCII 128-255 range
to UTF-8, and changes existing code to use it when the range is known to
be restricted to this one, rather than the previous macro which accepted
a wider range (any code point representable by 2 bytes), but had an
extra test on EBCDIC platforms, hence was larger than necessary and
slightly slower.

5 years agoutf8.h: Add assertions to macro
Karl Williamson [Fri, 15 May 2015 16:55:30 +0000 (10:55 -0600)]
utf8.h: Add assertions to macro

5 years agoChange to use UVCHR_SKIP over UNI_SKIP
Karl Williamson [Wed, 13 May 2015 23:38:08 +0000 (17:38 -0600)]
Change to use UVCHR_SKIP over UNI_SKIP

UNI_SKIP is somewhat ambiguous.  Perl has long used 'uvchr' as part of a
name to mean the unsigned values using the native character set plus
Unicode values for those above 255.

This also changes two calls (one in dquote_static.c and one in
dquote_inline.h) to use UVCHR_SKIP; they should not have been OFFUNI, as
they are dealing with native values.

5 years agoQuell compilation warning in regcomp.c
Aaron Crane [Fri, 4 Sep 2015 05:47:22 +0000 (07:47 +0200)]
Quell compilation warning in regcomp.c

This warning affected platforms where U32 is a C long rather than an int. It
was introduced in e4105e89df44935f2a4363ac725ff11e07de35d8.

5 years agoperlapi: Nits
Karl Williamson [Sat, 9 May 2015 03:35:12 +0000 (21:35 -0600)]
perlapi: Nits

5 years agoperlapi: Change slightly weird construct
Karl Williamson [Sat, 9 May 2015 03:25:33 +0000 (21:25 -0600)]
perlapi: Change slightly weird construct

As a native English speaker, I find it clearer to say that a bit vector
has a particular bit set, rather than to say that it includes that bit.

5 years agoperlapi use 'UTF-8' instead of variants of that
Karl Williamson [Sat, 9 May 2015 03:21:17 +0000 (21:21 -0600)]
perlapi use 'UTF-8' instead of variants of that

5 years agoperlapi: Change some 'eg' to 'e.g.'
Karl Williamson [Sat, 9 May 2015 03:19:13 +0000 (21:19 -0600)]
perlapi: Change some 'eg' to 'e.g.'

To make more standard

5 years agoperlapi: Add some S<>
Karl Williamson [Fri, 4 Sep 2015 04:30:56 +0000 (22:30 -0600)]
perlapi: Add some S<>

so that these constructs appear on a single output line for reader
convenience.

5 years agoVarious pods: Add C<> around many typed-as-is things
Karl Williamson [Thu, 7 May 2015 16:58:54 +0000 (10:58 -0600)]
Various pods: Add C<> around many typed-as-is things

Removes 'the' in front of parameter names in some instances.

5 years agoFix some pedantic pod erros in Thread::Queue
Karl Williamson [Fri, 4 Sep 2015 03:57:43 +0000 (21:57 -0600)]
Fix some pedantic pod erros in Thread::Queue

5 years agoStart fixing some pod pedantic errors
Karl Williamson [Fri, 4 Sep 2015 03:06:16 +0000 (21:06 -0600)]
Start fixing some pod pedantic errors

This fixes a bunch of them, but there are many more

5 years agoperlapi, perlintern: Add L<> links to pod
Karl Williamson [Fri, 24 Apr 2015 00:33:15 +0000 (18:33 -0600)]
perlapi, perlintern: Add L<> links to pod