This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agoRemove vestigial *.SH code which can link the extracted file into ../
Nicholas Clark [Wed, 15 May 2013 10:33:05 +0000 (12:33 +0200)]
Remove vestigial *.SH code which can link the extracted file into ../

4 of the *.SH files have code which links the extracted file into the parent
directory if the current directory ends SH. This code dates from Perl 1.
It seems that the intent was that the *.SH files could live in a SH/
directory, but that feature was neither used or mentioned in the
documentation in Perl 1, and hasn't been used since.

10 years agoMerge the pack refactoring to blead.
Nicholas Clark [Mon, 20 May 2013 19:42:33 +0000 (21:42 +0200)]
Merge the pack refactoring to blead.

10 years agoNotes in perldelta for the tiny XS-visible changes of the pack refactoring.
Nicholas Clark [Mon, 20 May 2013 19:40:27 +0000 (21:40 +0200)]
Notes in perldelta for the tiny XS-visible changes of the pack refactoring.

10 years agoAnnotate the "cold" paths in pp_pack.c with UNLIKELY().
Nicholas Clark [Wed, 8 May 2013 08:40:07 +0000 (10:40 +0200)]
Annotate the "cold" paths in pp_pack.c with UNLIKELY().

The usual case is nice regular bytes in the host's nice regular order.

10 years agoEliminate the implementations of [hv]to[vh][ls] for mixed-endian systems.
Nicholas Clark [Tue, 7 May 2013 16:25:53 +0000 (18:25 +0200)]
Eliminate the implementations of [hv]to[vh][ls] for mixed-endian systems.

As pp_pack.c has had mixed-endian support removed, there is little point in
keeping code in perl.h and util.c only needed for architectures that cannot
be built.

10 years agoEliminate Perl_my_swabn(), as it is now unused.
Nicholas Clark [Tue, 7 May 2013 16:17:39 +0000 (18:17 +0200)]
Eliminate Perl_my_swabn(), as it is now unused.

It is not marked as part of the API, and no code on CPAN is using it.

10 years agoWhen endian-swapping in pack, simply copy the bytes in reverse order.
Nicholas Clark [Tue, 7 May 2013 15:39:42 +0000 (17:39 +0200)]
When endian-swapping in pack, simply copy the bytes in reverse order.

This should restore support for big endian Crays. It doesn't support
mixed-endian systems.

10 years agoPass 'needs_swap' as a parameter to SHIFT_BYTES.
Nicholas Clark [Tue, 7 May 2013 14:22:08 +0000 (16:22 +0200)]
Pass 'needs_swap' as a parameter to SHIFT_BYTES.

It feels wrong to have it as an implicit parameter sucked in via the textual
expansion of the macro. Whilst it can be derived from the parameter
'datumtype', it seems that the C compiler generates a lot less efficient code
that way.

10 years agoWhen endian-swapping in unpack, simply copy the bytes in reverse order.
Nicholas Clark [Tue, 7 May 2013 13:15:54 +0000 (15:15 +0200)]
When endian-swapping in unpack, simply copy the bytes in reverse order.

It is considerably simpler to re-order the bytes before reading them into
the variable of the desired type, than to read into the variable and then
need a specialised "reverse this integer" function for each size of integer.

This should restore support for big endian Crays. It doesn't support
mixed-endian systems. Support for mixed-endian systems can be restored (if
needed) by re-ordering the bytes correctly at the locations which currently
only know how to reverse the bytes.

10 years agoFold the implementation of DO_BO_UNPACK into SHIFT_BYTES(), its only user.
Nicholas Clark [Tue, 7 May 2013 10:23:00 +0000 (12:23 +0200)]
Fold the implementation of DO_BO_UNPACK into SHIFT_BYTES(), its only user.

10 years agoRe-implement SHIFT16 and SHIFT32 as wrappers to SHIFT_BYTES.
Nicholas Clark [Tue, 7 May 2013 09:53:17 +0000 (11:53 +0200)]
Re-implement SHIFT16 and SHIFT32 as wrappers to SHIFT_BYTES.

10 years agoRefactor the two uses of SHIFT{16,32} not followed by DO_BO_UNPACK().
Nicholas Clark [Tue, 7 May 2013 08:08:53 +0000 (10:08 +0200)]
Refactor the two uses of SHIFT{16,32} not followed by DO_BO_UNPACK().

There is one place where SHIFT16() is not immediately followed by
DO_BO_UNPACK() ('n!' and 'v!'), and one place where SHIFT32() is not
immediately followed by DO_BO_UNPACK() ('N!' and 'V!'). Every other use of
either macro is followed by DO_BO_UNPACK(). For the two locations that don't
have DO_BO_UNPACK(), the modifiers '<' and '>' are illegal, hence
DO_BO_UNPACK() will always be a no-op. Hence add DO_BO_UNPACK() to both
(which permits refactoring to simplify things), and add assert()s that the
assumptions are true.

10 years agoRemove the now unused 'type' argument from the macros DO_BO_(UN)?PACK.
Nicholas Clark [Tue, 7 May 2013 07:25:39 +0000 (09:25 +0200)]
Remove the now unused 'type' argument from the macros DO_BO_(UN)?PACK.

10 years agoAs DO_BO_(UN)?PACK are now implemented with my_swabn(), simplify 'J' and 'j'.
Nicholas Clark [Mon, 6 May 2013 18:40:34 +0000 (20:40 +0200)]
As DO_BO_(UN)?PACK are now implemented with my_swabn(), simplify 'J' and 'j'.

The conditionally compiled code to figure out the correct named integer
size for UVs and IVs is no longer needed, as my_swabn() will swap UVs and
IVs, whatever their length.

10 years agoMerge the identical definitions of DO_BO_UNPACK and DO_BO_PACK.
Nicholas Clark [Mon, 6 May 2013 17:58:10 +0000 (19:58 +0200)]
Merge the identical definitions of DO_BO_UNPACK and DO_BO_PACK.

Delete the now-unused mixed-endian definitions of DO_BO_UNPACK and
DO_BO_PACK, and the macro BO_CANT_DOIT, as they were the last two things
using it.

10 years agoSwap byte order in DO_BO_(UN)?PACK based on a variable needs_swap.
Nicholas Clark [Mon, 6 May 2013 17:41:10 +0000 (19:41 +0200)]
Swap byte order in DO_BO_(UN)?PACK based on a variable needs_swap.

Add the macro NEEDS_SWAP to initialise needs_swap based on
TYPE_ENDIANNESS(datumtype). This makes the two definitions of DO_BO_UNPACK
identical, and the two definitions of DO_BO_PACK identical.

This also makes building pp_pack.c on a mixed endian byteorder architecture
a compile time error. The commit adds pointers on where to add code to
re-instate support for such architectures.

10 years agoDO_BO_{UN,}PACK can use my_swabn() directly.
Nicholas Clark [Mon, 6 May 2013 16:43:26 +0000 (18:43 +0200)]
DO_BO_{UN,}PACK can use my_swabn() directly.

This removes the only users of my_{be,le,h}to{be,le,h}n, so remove the
definitions for those macros.

10 years agoUse DO_BO_{UN,}PACK in place of DO_BO_UNPACK_{N,PC}
Nicholas Clark [Mon, 6 May 2013 16:05:24 +0000 (18:05 +0200)]
Use DO_BO_{UN,}PACK in place of DO_BO_UNPACK_{N,PC}

Also, eliminate the intermediate macros DO_BO_PACK_PTR and DO_BO_UNPACK_PTR.

10 years agoEliminate my_{hto[bl]e,[bl]etoh}{16,32,64,s,i,l} as nothing now uses them.
Nicholas Clark [Mon, 6 May 2013 15:16:18 +0000 (17:16 +0200)]
Eliminate my_{hto[bl]e,[bl]etoh}{16,32,64,s,i,l} as nothing now uses them.

10 years agoIn pp_pack.c, refactor DO_BO_(UN)?PACK to use my_letohn etc
Nicholas Clark [Mon, 6 May 2013 14:54:12 +0000 (16:54 +0200)]
In pp_pack.c, refactor DO_BO_(UN)?PACK to use my_letohn etc

Previously they were using a my_letoh* function for the appropriate size.

This commit probably breaks fixed 16 and 32 bit templates on big endian
Crays where sizeof(short) and sizeof(int) are 8. A future commit will
restore support. (Although it's not clear whether such Crays can still
build blead cleanly, as we've not had any feedback since Boeing
decommissioned their Cray.)

10 years agoIn pp_pack.c, refactor DO_BO_(UN)?PACK_PTR to use my_letohn etc
Nicholas Clark [Mon, 6 May 2013 14:36:09 +0000 (16:36 +0200)]
In pp_pack.c, refactor DO_BO_(UN)?PACK_PTR to use my_letohn etc

Previously they were casting the pointer to an integer value, calling
a my_letoh* function for the appropriate size, and casting the return value
back to a pointer.

10 years agoIn pp_pack.c, refactor DO_BO_(UN)?PACK_N to use sizeof() on the variable.
Nicholas Clark [Mon, 6 May 2013 14:22:01 +0000 (16:22 +0200)]
In pp_pack.c, refactor DO_BO_(UN)?PACK_N to use sizeof() on the variable.

Previously they were using sizeof() on the type argument passed to the
macro. This change makes their implementation more like DO_BO_(UN)?PACK
and DO_BO_(UN)?PACK_PTR.

10 years agoRefactor macros in pp_pack.c, removing support for mixed-endian byte orders.
Nicholas Clark [Mon, 6 May 2013 13:46:02 +0000 (15:46 +0200)]
Refactor macros in pp_pack.c, removing support for mixed-endian byte orders.

The byte-order handling can be simplified considerably if we don't have to
support mixed-endian systems. It's not clear whether Perl 5.000 even
compiled on PDP-11s, let alone more recent versions.

Support probably can be added back at the end of the refactoring, if someone
has time and a PDP-11 to test on, but for the intermediate stages it is a
lot easier not to need to think about such platforms.

10 years agoEliminate the conditionally-compiled fallback functions for htonl etc.
Nicholas Clark [Mon, 6 May 2013 12:40:04 +0000 (14:40 +0200)]
Eliminate the conditionally-compiled fallback functions for htonl etc.

These are now only being used for mixed-endian platforms which do not
provide their own htnol (etc) functions. Given that the fallbacks have been
buggy since they were added in Perl 3.0, it's safe to conclude that no
mixed-endian platforms were ever using these functions.

It's also unclear why these functions were ever marked as 'A', part of the
API. XS code can't call them directly, as it can't rely on them being
compiled. Unsurprisingly, no code on CPAN references them.

10 years agoRemove buggy loop-based byte swapping code.
Nicholas Clark [Mon, 6 May 2013 11:28:20 +0000 (13:28 +0200)]
Remove buggy loop-based byte swapping code.

The irony is that the union-based code special-cased for little endian
systems actually works everywhere, even on mixed-endian systems.

10 years agoUpdate the Win32 miniperl conditional compilation, for the htonl etc changes.
Nicholas Clark [Mon, 6 May 2013 06:20:57 +0000 (08:20 +0200)]
Update the Win32 miniperl conditional compilation, for the htonl etc changes.

As of commit 19253ae62cd13079 (Oct 2012), miniperl on Win32 avoids using
Winsock. The win32_* wrappers for htonl etc had used the pre-processor
macro MYSWAP to conditionally compile in the correct code. However, MYSWAP
was defined as a side effect of using the htonl etc wrappers in util.c,
which are no longer needed. Hence use the WIN32_NO_SOCKETS macro directly
in win32sck.c for the correct conditional compilation.

10 years agoFallbacks for ntohl, ntohs, htonl and htons for little endian systems.
Nicholas Clark [Sat, 4 May 2013 20:50:12 +0000 (22:50 +0200)]
Fallbacks for ntohl, ntohs, htonl and htons for little endian systems.

The host byteorder agnostic functions in util.c are now only used on mixed
endian systems.

10 years agoProvide ntohl, ntohs, htonl and htons no-op macros on big endian systems.
Nicholas Clark [Sat, 4 May 2013 20:03:59 +0000 (22:03 +0200)]
Provide ntohl, ntohs, htonl and htons no-op macros on big endian systems.

This means that there are always macros or functions for ntohl, ntohs,
htonl and htons available, so eliminate use of HAS_NTOHL etc, and
unconditionally compile the code that it was protecting. However, as code
on CPAN is using these guard macros, define all of them in perl.h

(Technically the 4 are not quite no-ops, as they truncate their values to
32 or 16 bits, to be consistent with the implementations for platforms which
need re-ordering.)

10 years agoProvide vtohl, vtohs, htovl and htovs no-op macros on little endian systems.
Nicholas Clark [Sat, 4 May 2013 19:30:27 +0000 (21:30 +0200)]
Provide vtohl, vtohs, htovl and htovs no-op macros on little endian systems.

This means that there are always macros or functions for vtohl, vtohs,
htovl and htovs available, so eliminate HAS_VTOHL etc, and unconditionally
compile the code that it was protecting. grep.cpan.me shows that no code on
CPAN uses any of these macros.

(Technically the 4 are not quite no-ops, as they truncate their values to
32 or 16 bits, to be consistent with the implementations for platforms which
need re-ordering.)

10 years agovtohl, vtohs, htovl and htovs are no-ops on 64 bit little endian systems.
Nicholas Clark [Sat, 4 May 2013 19:07:14 +0000 (21:07 +0200)]
vtohl, vtohs, htovl and htovs are no-ops on 64 bit little endian systems.

Previously they were implemented as function calls on 64 bit little endian
systems. Bit endian systems implemented them as byte-swapping macros. 32
little endian system didn't implement them at all. 32 and 64 bit little
endian systems now behave identically.

10 years agoEliminate the definitions for DO_BO_PACK_P and DO_BO_UNPACK_P.
Nicholas Clark [Fri, 3 May 2013 15:06:01 +0000 (17:06 +0200)]
Eliminate the definitions for DO_BO_PACK_P and DO_BO_UNPACK_P.

Commit 07409e015252427f in April 2005 replaced all the uses of these two
macros with DO_BO_PACK_PC and DO_BO_UNPACK_PC.

10 years agoEliminate pre-5.9.x conditional code for PERL_PACK_CAN_SHRIEKSIGN
Nicholas Clark [Fri, 3 May 2013 13:52:38 +0000 (15:52 +0200)]
Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_SHRIEKSIGN

PERL_PACK_CAN_SHRIEKSIGN has been unconditionally defined for versions 5.9.x
and greater, and undefined for 5.8.x. As we are never going to need to
port changes back to maint-5.8 any more, eliminate all the 5.8.x related code
and the macro that supports it.

10 years agoEliminate pre-5.9.x conditional code for PERL_PACK_CAN_BYTEORDER
Nicholas Clark [Fri, 3 May 2013 13:26:34 +0000 (15:26 +0200)]
Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_BYTEORDER

PERL_PACK_CAN_BYTEORDER has been unconditionally defined for versions 5.9.x
and greater, and undefined for 5.8.x. As we are never going to need to
port changes back to maint-5.8 any more, eliminate all the 5.8.x related code,
and the macro that supports it.

10 years agoMerge the reworking of how genpacksizetables.pl is used.
Nicholas Clark [Mon, 20 May 2013 19:12:01 +0000 (21:12 +0200)]
Merge the reworking of how genpacksizetables.pl is used.

10 years agoAdd regen/genpacksizetables.pl to t/porting/regen.t
Nicholas Clark [Mon, 29 Apr 2013 10:06:39 +0000 (12:06 +0200)]
Add regen/genpacksizetables.pl to t/porting/regen.t

10 years agoMove genpacksizetables.pl to regen/genpacksizetables.pl
Nicholas Clark [Mon, 29 Apr 2013 09:54:19 +0000 (11:54 +0200)]
Move genpacksizetables.pl to regen/genpacksizetables.pl

10 years agoRefactor genpacksizetables.pl to use regen/regen_lib.pl
Nicholas Clark [Mon, 29 Apr 2013 09:47:30 +0000 (11:47 +0200)]
Refactor genpacksizetables.pl to use regen/regen_lib.pl

10 years agoExtract the generated packprops array into packsizetables.c.
Nicholas Clark [Mon, 29 Apr 2013 09:23:11 +0000 (11:23 +0200)]
Extract the generated packprops array into packsizetables.c.

The C source is the output from genpacksizetables.pl
Previously it was pasted into pp_pack.c

 LocalWords:  packprops

10 years agoPropagate a change from commit 1651fc447620d361 into genpacksizetables.pl.
Nicholas Clark [Mon, 29 Apr 2013 09:08:05 +0000 (11:08 +0200)]
Propagate a change from commit 1651fc447620d361 into genpacksizetables.pl.

pp_pack.c contains a table generated by genpacksizetables.pl, pasted into the
C source. The C source was updated by commit 1651fc447620d361 in April 2007,
but the table used to generate the code was not.

10 years agogenpacksizetables.pl: Correct comment typo
Karl Williamson [Wed, 13 Mar 2013 22:18:12 +0000 (16:18 -0600)]
genpacksizetables.pl: Correct comment typo

10 years agoChange LIKELY() and UNLIKELY() to cast their first argument to a bool.
Nicholas Clark [Wed, 6 Mar 2013 15:27:08 +0000 (16:27 +0100)]
Change LIKELY() and UNLIKELY() to cast their first argument to a bool.

This avoids problems such as pointers being compared with the literal value 1.
Suggested by Zefram.

Note that this is technically a change of behaviour, as the macro EXPECT(),
which they are both both wrappers for, returns its value, so they will now
be returning TRUE or FALSE, rather than the actual value passed to them.
However, all uses in the core and on CPAN are only within if() statements, so
this should not make any difference in practice.

10 years agohandy.h: Change the error return of two macros
Karl Williamson [Sat, 18 May 2013 20:05:00 +0000 (14:05 -0600)]
handy.h: Change the error return of two macros

These two undocumented macros returned the REPLACEMENT CHARACTER if the
input was outside the Latin1 range.  This was contrary to all other
similar macros, which return their input if it is invalid.  It caused
warnings in some (dumber than average) compilers.

These macros are undocumented; this changes the behavior only of illegal
inputs to them.

10 years agoregcomp.c: Add comment
Karl Williamson [Sat, 18 May 2013 19:55:50 +0000 (13:55 -0600)]
regcomp.c: Add comment

10 years agoutf8.c: White space only.
Karl Williamson [Sat, 18 May 2013 19:06:47 +0000 (13:06 -0600)]
utf8.c: White space only.

Indent in newly formed block

10 years agofold_grind.t: Add tests
Karl Williamson [Sat, 18 May 2013 19:09:05 +0000 (13:09 -0600)]
fold_grind.t: Add tests

fold-grind stresses the /i regex handling by reading the Unicode folding
rules and creating tests for problematic cases, as well as some
non-problematic ones.

Because of the large number of tests generated, it otherwise avoids
tests that it doesn't think are problematic.

Problematic cases include those whose folds cross the ordinal 127/128 or
255/256 boundaries, along with other considerations.

Until this commit, fold_grind failed to realize that even if the pair of
characters currently being tested don't cross those boundaries, if their
eventual folds do, this could be problematic.  Suppose X and Y are both
on the same side of the boundaries, and both fold to Z which is on
another side.  Then X and Y should be equivalent under /i even if the
fold to Z is prohibited because of /aa or /l.  fold_grind was
overzealous in pruning such tests.

The previous patch fixed bugs in handling such cases; and this patch
fixes the tests to look for similar things that might possibly arise in
the future.

Interestingly, this bug came to light during porting to an EBCDIC
platform.  The reason is that because of the different collation order,
fold_grind chose one of the buggy cases to test as one its
non-problematic tests.

10 years agoFix multi-char fold edge case
Karl Williamson [Sat, 18 May 2013 14:25:16 +0000 (08:25 -0600)]
Fix multi-char fold edge case

use locale;
fc("\N{LATIN CAPITAL LETTER SHARP S}")
   eq 2 x fc("\N{LATIN SMALL LETTER LONG S}")

should return true, as the SHARP S folds to two 's's in a row, and the
LONG S is an antique variant of 's', and folds to s.  Until this commit,
the expression was false.

Similarly, the following should match, but didn't until this commit:

"\N{LATIN SMALL LETTER SHARP S}" =~ /\N{LATIN SMALL LETTER LONG S}{2}/iaa

The reason these didn't work properly is that in both cases the actual
fold to 's' is disallowed.  In the first case because of locale; and in
the second because of /aa.  And the code wasn't smart enough to realize
that these were legal.

The fix is to special case these so that the fold of sharp s (both
capital and small) is two LONG S's under /aa; as is the fold of the
capital sharp s under locale.  The latter is user-visible, and the
documentation of fc() now points that out.  I believe this is such an
edge case that no mention of it need be done in perldelta.

10 years agoExpand flags parameter from boolean in _to_fold_latin1
Karl Williamson [Sat, 18 May 2013 05:07:05 +0000 (23:07 -0600)]
Expand flags parameter from boolean in _to_fold_latin1

This will be used in future commits to pass more flags.

10 years agounicode_constants.h: Add some #defines
Karl Williamson [Fri, 17 May 2013 03:37:43 +0000 (21:37 -0600)]
unicode_constants.h: Add some #defines

These will be used in future commits

10 years agoutf8.c: Replace two macro calls with equiv single
Karl Williamson [Thu, 16 May 2013 02:55:27 +0000 (20:55 -0600)]
utf8.c: Replace two macro calls with equiv single

UTF8_IS_ABOVE_LATIN1() is equivalent to
(! UTF8_IS_INVARIANT && !UTF8_IS_DOWNGRADEABLE_START)

So we can use just it, for clearer code with fewer branches.

10 years agolib/charnames.t: Fix wrongly complemented test
Karl Williamson [Sat, 11 May 2013 22:00:02 +0000 (16:00 -0600)]
lib/charnames.t: Fix wrongly complemented test

The 'if' test should be the opposite of what it is.  I believe I had it
this way for forcing the branch to be taken during testing, and forgot
to restore it.  It only matters if Perl is compiled with early Unicodes,
or on a non-ASCII platform.

10 years agot/re/fold_grind.t: White space only
Karl Williamson [Fri, 10 May 2013 02:48:40 +0000 (20:48 -0600)]
t/re/fold_grind.t: White space only

Commit 3345a47950127cf99a197eba4dce9c91f7bc9139 created a new
block; but didn't indent it.  This commit does.

10 years agoperlapi: Move 'experimental' warning to front of entries
Karl Williamson [Tue, 7 May 2013 16:04:40 +0000 (10:04 -0600)]
perlapi: Move 'experimental' warning to front of entries

In a long multi-paragraph entry, the fact that the described function is
considered experimental may be lost, as it comes at the end.  This just
moves it to the front.

10 years agoregcomp.c: Remove always-true test
Karl Williamson [Tue, 7 May 2013 16:01:58 +0000 (10:01 -0600)]
regcomp.c: Remove always-true test

In this code, j is guaranteed to be above 255, so no need to test for
that.

10 years agoregcomp.c: White-space only
Karl Williamson [Mon, 6 May 2013 00:26:39 +0000 (18:26 -0600)]
regcomp.c: White-space only

The previous commit allows us to outdent a largish block, reflowing
things to fit into the extra available width, and saving a few vertical
pixels.

10 years agoregcomp.c: Reorder two 'if's so shorter branches are first
Karl Williamson [Sun, 5 May 2013 16:40:56 +0000 (10:40 -0600)]
regcomp.c: Reorder two 'if's so shorter branches are first

This makes it easier to understand what is going on

10 years agoperllocale: Update to mention fc(), \F
Karl Williamson [Sun, 5 May 2013 04:22:53 +0000 (22:22 -0600)]
perllocale: Update to mention fc(), \F

10 years agoregcomp.c: Clarify comment
Karl Williamson [Sun, 5 May 2013 03:23:05 +0000 (21:23 -0600)]
regcomp.c: Clarify comment

10 years agopp.c: Eliminate custom macro and use Copy() instead
Karl Williamson [Sun, 5 May 2013 02:23:14 +0000 (20:23 -0600)]
pp.c: Eliminate custom macro and use Copy() instead

I think it's clearer to use Copy.  When I wrote this custom macro, we
didn't have the infrastructure to generate a UTF-8 encoded string at
compile time.

10 years agoperl #117865] [PATCH] Eliminate useless variable and sizeof(char)
Dagfinn Ilmari Mannsåker [Sun, 5 May 2013 02:18:35 +0000 (20:18 -0600)]
perl #117865] [PATCH] Eliminate useless variable and sizeof(char)

bufsiz is always just set from bsiz (via a useless multiplication by
sizeof(char), which is by definition 1), so instead of trying to keep
them in sync, just get rid of bufsiz use bsiz directly# Please enter the commit message for your changes. Lines starting

10 years agoop.c: Don't fold constant fc() in locale
Karl Williamson [Sat, 4 May 2013 22:09:39 +0000 (16:09 -0600)]
op.c: Don't fold constant fc() in locale

We do compile time folding of calls to ops with constant parameters.
This should be skipped if the op's result depends on locale, and it is
being called from within the scope of 'use locale', as the result is not
known until runtime.  fc() was folding anyway.

There is no test, as this only shows up when run in a locale that it
makes a difference in, and there is no guarantee that such a locale
would occur on any computer, and it is a real pain to go searching
through the computer's available locales for such a one for just this
error.

10 years agoautodoc.pl: Don't list undocumented deprecated fcns in API
Karl Williamson [Tue, 30 Apr 2013 14:42:08 +0000 (08:42 -0600)]
autodoc.pl: Don't list undocumented deprecated fcns in API

autodoc creates a list of all the undocumented functions that are part
of the API.  It omits ones that are experimental and whose API may
change; and now it omits ones that are deprecated (and whose API is
planned to change to be non-existent)

10 years agoautodoc.pl: Add note for deprecated functions
Karl Williamson [Tue, 30 Apr 2013 14:39:44 +0000 (08:39 -0600)]
autodoc.pl: Add note for deprecated functions

This causes each deprecated function to have a prominent note to that
effect in its API documentation.

10 years agoembed.fnc: Slight clarification in comments
Karl Williamson [Sat, 27 Apr 2013 14:59:19 +0000 (08:59 -0600)]
embed.fnc: Slight clarification in comments

10 years agoAdd tests for case-change macros API
Karl Williamson [Mon, 20 May 2013 16:39:56 +0000 (10:39 -0600)]
Add tests for case-change macros API

10 years agoUse new case changing macros
Karl Williamson [Thu, 25 Apr 2013 16:07:47 +0000 (10:07 -0600)]
Use new case changing macros

The previous commit added macros to do some case changing.  This
commit uses them in the core, where appropriate.

10 years agohandy.h: Add some macro definitions
Karl Williamson [Thu, 25 Apr 2013 16:05:22 +0000 (10:05 -0600)]
handy.h: Add some macro definitions

These macros fill in all the missing case changing operations.  They
were omitted before because they are identical in their input domains to
other operations.  But by adding them here, that detail no longer need be
known by the callers.  toFOLD_LC is not documented, as is subject to
change

10 years agopp.c: Nit in comment
Karl Williamson [Thu, 25 Apr 2013 14:41:13 +0000 (08:41 -0600)]
pp.c: Nit in comment

10 years agoperlclib.pod: Update character class macro descriptions
Karl Williamson [Wed, 24 Apr 2013 21:39:08 +0000 (15:39 -0600)]
perlclib.pod: Update character class macro descriptions

Much has changed since this pod was last updated.

10 years agoperlclib.pod: Fix too long verbatim lines
Karl Williamson [Wed, 24 Apr 2013 21:36:07 +0000 (15:36 -0600)]
perlclib.pod: Fix too long verbatim lines

10 years agoperlapi: Add docs for some case-changing macros; clarify others
Karl Williamson [Thu, 25 Apr 2013 03:18:14 +0000 (21:18 -0600)]
perlapi: Add docs for some case-changing macros; clarify others

The case changing macros are now almost all documented.  The exception
is toUPPER_LC, which may change in 5.19

In addition the functions in utf8.c that these macros call now refer to
them instead of having their own documentation.  People should really be
using the macros instead of calling the functions directly.  I'm not
deprecating the functions because I can't foresee the need to change
them, so code that uses them should continue to be ok.

10 years agoRemove perlsh, which is neither installed nor referenced anywhere.
Nicholas Clark [Mon, 18 Mar 2013 13:35:21 +0000 (14:35 +0100)]
Remove perlsh, which is neither installed nor referenced anywhere.

Described as a "poor man's perl shell", it is unreferenced, and virtually
unchanged since its addition in perl 2. As it is never installed, it's not
used by anyone.

10 years agoUpdate Test-Harness to CPAN version 3.27
Nicholas Clark [Thu, 2 May 2013 08:45:57 +0000 (10:45 +0200)]
Update Test-Harness to CPAN version 3.27

  [DELTA]

  3.28    2013-05-02
          - Bugfix: Fix taint failures on Windows (Jan Dubois)

  3.27    2013-04-30
          - Dramatically reduce memory usage (Nick Clark, RT #84939)
          - Store test_num (in Grammar.pm) as a number instead of a string.
            Reduces memory usage (Nick Clark, RT #84939)
          - PERL5LIB is always propogated to a test's @INC, even with taint more
            (Schwern, RT #84377)

The local modifications to t/source.t are retained. [rt.cpan.org #64353]

10 years agohandy.h: Add missing toFOLD_utf8 macro
Karl Williamson [Thu, 25 Apr 2013 03:16:29 +0000 (21:16 -0600)]
handy.h: Add missing toFOLD_utf8 macro

This corresponds to the other case changing macros

10 years agohandy.h: define some synonyms for consistency
Karl Williamson [Wed, 24 Apr 2013 21:29:16 +0000 (15:29 -0600)]
handy.h: define some synonyms for consistency

Other macros have these suffixes, so for uniformity add these.

10 years agoregcomp.c: White-space only
Karl Williamson [Tue, 23 Apr 2013 21:14:04 +0000 (15:14 -0600)]
regcomp.c: White-space only

Change this to follow perl coding conventions

10 years agomg.c: White-space only
Karl Williamson [Mon, 22 Apr 2013 20:44:08 +0000 (14:44 -0600)]
mg.c: White-space only

I found re-formatting this multi-line 'if' to be easier to understand

10 years agotoke.c: Remove redundant test
Karl Williamson [Mon, 22 Apr 2013 20:34:47 +0000 (14:34 -0600)]
toke.c: Remove redundant test

This checks that something is both not-printable and not a word
character, but all word characters are printable, so just the
non-printable test suffices.

10 years agot/porting/regen.t: Add file to check
Karl Williamson [Tue, 16 Apr 2013 15:04:50 +0000 (09:04 -0600)]
t/porting/regen.t: Add file to check

10 years agohandy.h: Clarify comment
Karl Williamson [Sat, 13 Apr 2013 21:09:48 +0000 (15:09 -0600)]
handy.h: Clarify comment

10 years agoregcomp.c: White-space only, wrap comment to fit
Karl Williamson [Sun, 7 Apr 2013 03:03:44 +0000 (21:03 -0600)]
regcomp.c: White-space only, wrap comment to fit

10 years agomktables: Fix typos in comments
Karl Williamson [Sun, 24 Mar 2013 23:59:59 +0000 (17:59 -0600)]
mktables: Fix typos in comments

One of these fixes is for where a real CTRL-X was specified, instead of
$^X

10 years agoutf8.c: Remove redundant assignment.
Karl Williamson [Fri, 29 Mar 2013 01:56:39 +0000 (19:56 -0600)]
utf8.c: Remove redundant assignment.

This variable is always set just below.

10 years agot/TEST: Don't bail if fails in t/base unless minitest
Karl Williamson [Wed, 13 Mar 2013 04:34:17 +0000 (22:34 -0600)]
t/TEST: Don't bail if fails in t/base unless minitest

In order to completely compile Perl, many modules must have been parsed
and compiled, so if there is a full perl, we know that things basically
work.  The purpose of bailing out is that if these supposedly very base
level functionality tests don't work, there's no point in continuing.
But over the years, tests of more esoteric functionality have been
added here, and if one of them doesn't work, it still could be that Perl
pretty much does work.

I believe it would be best to move such non-basic tests elsewhere, but
that's work, and hasn't bitten us much so far; this change lessens the
severity of the biting even more.  Where it will really bite is if
things are so bad that a full perl binary can't be compiled, and we are
trying to figure out why using minitest.

10 years agot/porting/bincompat.t: Typo in comment
Karl Williamson [Mon, 25 Mar 2013 20:59:26 +0000 (14:59 -0600)]
t/porting/bincompat.t: Typo in comment

10 years agoutf8.c: Use mnemonics instead of hex numbers
Karl Williamson [Sun, 24 Mar 2013 19:11:25 +0000 (13:11 -0600)]
utf8.c: Use mnemonics instead of hex numbers

10 years agocharnames: fix nit in comment
Karl Williamson [Sun, 17 Feb 2013 16:18:06 +0000 (09:18 -0700)]
charnames: fix nit in comment

10 years agoRemove double space between words in pod
Brian Fraser [Tue, 26 Mar 2013 01:34:37 +0000 (19:34 -0600)]
Remove double space between words in pod

10 years agopodcheck.t: Avoid misleading error message
Karl Williamson [Fri, 22 Mar 2013 18:25:00 +0000 (12:25 -0600)]
podcheck.t: Avoid misleading error message

If there are input files on the command line that don't exist, prior to
this commit, the message was output that they are transitory.  This adds
a check and a correct message.

10 years agolib/utf8.pm: Fix pod verbatim line wraps
Karl Williamson [Fri, 22 Mar 2013 18:21:14 +0000 (12:21 -0600)]
lib/utf8.pm: Fix pod verbatim line wraps

10 years agolib/utf8.pm: Pod clarification and nit
Karl Williamson [Fri, 17 May 2013 03:35:23 +0000 (21:35 -0600)]
lib/utf8.pm: Pod clarification and nit

10 years agoAdd missing test for regex parse error
Karl Williamson [Wed, 20 Mar 2013 17:35:58 +0000 (11:35 -0600)]
Add missing test for regex parse error

10 years agoregcomp.c: Use mnemonic instead of number
Karl Williamson [Wed, 20 Mar 2013 15:30:11 +0000 (09:30 -0600)]
regcomp.c: Use mnemonic instead of number

10 years agotoke.c: VALID_LEN_ONE_IDENT only needs a char, not a char*
Brian Fraser [Sat, 9 Mar 2013 19:20:00 +0000 (16:20 -0300)]
toke.c: VALID_LEN_ONE_IDENT only needs a char, not a char*

Rather than passing s and having the macro do a bunch of *s,
just pass and expect *s.

10 years agotoke.c, S_intuit_method: Minor parsing speedup for 'maybe_method $foo'
Brian Fraser [Sat, 9 Mar 2013 19:17:04 +0000 (16:17 -0300)]
toke.c, S_intuit_method: Minor parsing speedup for 'maybe_method $foo'

This commit moves a scan_word() closer to when it's actually used,
which provides a minor speedup for things like 'new $foo' or
'is $foo, $bar'.

10 years agotoke.c: Call base macro that does the same thing
Karl Williamson [Fri, 15 Mar 2013 19:44:26 +0000 (13:44 -0600)]
toke.c: Call base macro that does the same thing

SPACE_OR_TAB is the same thing as isBLANK, or perhaps more clearly
isBLANK_A.  And these latter macros only have one branch instead of 2
(but some extra masking)

10 years agoadd new perldelta
Ricardo Signes [Mon, 20 May 2013 13:36:00 +0000 (09:36 -0400)]
add new perldelta

10 years agobump version to 5.19.1
Ricardo Signes [Mon, 20 May 2013 13:15:02 +0000 (09:15 -0400)]
bump version to 5.19.1

10 years agoperldelta: 5.19.0, shortest perldelta ever? v5.19.0
Ricardo Signes [Mon, 20 May 2013 12:10:31 +0000 (08:10 -0400)]
perldelta: 5.19.0, shortest perldelta ever?

10 years agoupdate corelist for Getopt::Std, utf8
Ricardo Signes [Mon, 20 May 2013 11:54:45 +0000 (07:54 -0400)]
update corelist for Getopt::Std, utf8

10 years agoBump $Getopt::Std::VERSION following commit 0c0a84c65e572a92.
Nicholas Clark [Mon, 20 May 2013 10:37:39 +0000 (12:37 +0200)]
Bump $Getopt::Std::VERSION following commit 0c0a84c65e572a92.