summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove rules to delete *.loadmap and *.prelmap files, generated on VM/ESANicholas Clark2013-05-203-4/+1
| | | | | | These rules to clean up properly on VM/ESA were added in Oct 1998 by perforce changes 1961, 1962 and 1963 in the confperl branch. VM/ESA support was removed by commit 043fec90e88a2e23 in Aug 2012.
* Add x2p/Makefile.SH to the *.SH files processed by the top level Makefile.Nicholas Clark2013-05-202-5/+2
| | | | | This makes the top level Makefile responsible for deleting x2p/Makefile. With this, we can eliminate the 'sh' and 'shextract' from x2p's Makefile.
* Remove the now unused 'shlist' Makefile targets.Nicholas Clark2013-05-202-7/+1
|
* Programmatically generate dependencies for all *.SH files.Nicholas Clark2013-05-202-39/+17
| | | | | | Previously dependencies for Makefile, config.h and makedepend were explicitly coded into verbatim sections of Makefile.SH, with most of the others being generated by makedepend.SH
* Add runtests.SH to the code that generates the targets sh and shextract.Nicholas Clark2013-05-201-5/+2
| | | | The generated Makefile is functionally identical.
* Eliminate x2p/cflags.SH. x2p's Makefile can use ../cflagsNicholas Clark2013-05-204-110/+4
| | | | x2p/Makefile is only used on *nix, so this should not present a problem.
* Pass in to makedepend the name(s) of files that all objects depend on.Nicholas Clark2013-05-203-4/+4
|
* In the Makefile, generate the value of shextract programmatically.Nicholas Clark2013-05-201-4/+12
| | | | | | | | | | | | shextract lists the files generated by shell scripts named *.SH which need deleting. Instead of maintaining it by hand, generate it in Makefile.SH from the list of *.SH files. This indirectly eliminates the last reference to F<makedir>. makedir.SH was eliminated by commit ebca06e95b02d1a8 and the reference to makedir.SH in Makefile.SH eliminated by commit 847471027aa42997 (both Sept 2009), but that commit missed that the reference to makedir a few lines later was related.
* Defer running makedepend in x2p/ until it's needed.Nicholas Clark2013-05-201-1/+3
| | | | | | | We can run makedepend in x2p/ as part of the regular build process, which means that it can run as part of a parallel make. This gets a slight speedup (0.2s on this system), and increases flexibility on how x2p/Makefile is generated.
* Add x2p/makefile to the dependencies for targets within x2p/Nicholas Clark2013-05-201-3/+3
| | | | | | This will give us more flexibility in when and how we generate it. [x2p/makefile is x2p/GNUmakefile on OS X]
* Remove vestigial *.SH code which can link the extracted file into ../Nicholas Clark2013-05-204-24/+0
| | | | | | | | 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.
* Merge the pack refactoring to blead.Nicholas Clark2013-05-2013-1249/+227
|\
| * Notes in perldelta for the tiny XS-visible changes of the pack refactoring.Nicholas Clark2013-05-201-3/+9
| |
| * Annotate the "cold" paths in pp_pack.c with UNLIKELY().Nicholas Clark2013-05-201-7/+7
| | | | | | | | The usual case is nice regular bytes in the host's nice regular order.
| * Eliminate the implementations of [hv]to[vh][ls] for mixed-endian systems.Nicholas Clark2013-05-202-103/+6
| | | | | | | | | | | | 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.
| * Eliminate Perl_my_swabn(), as it is now unused.Nicholas Clark2013-05-204-26/+0
| | | | | | | | It is not marked as part of the API, and no code on CPAN is using it.
| * When endian-swapping in pack, simply copy the bytes in reverse order.Nicholas Clark2013-05-203-74/+67
| | | | | | | | | | This should restore support for big endian Crays. It doesn't support mixed-endian systems.
| * Pass 'needs_swap' as a parameter to SHIFT_BYTES.Nicholas Clark2013-05-201-29/+32
| | | | | | | | | | | | | | 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.
| * When endian-swapping in unpack, simply copy the bytes in reverse order.Nicholas Clark2013-05-201-6/+26
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Fold the implementation of DO_BO_UNPACK into SHIFT_BYTES(), its only user.Nicholas Clark2013-05-201-29/+3
| |
| * Re-implement SHIFT16 and SHIFT32 as wrappers to SHIFT_BYTES.Nicholas Clark2013-05-201-20/+6
| |
| * Refactor the two uses of SHIFT{16,32} not followed by DO_BO_UNPACK().Nicholas Clark2013-05-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove the now unused 'type' argument from the macros DO_BO_(UN)?PACK.Nicholas Clark2013-05-201-41/+41
| |
| * As DO_BO_(UN)?PACK are now implemented with my_swabn(), simplify 'J' and 'j'.Nicholas Clark2013-05-202-38/+4
| | | | | | | | | | | | 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.
| * Merge the identical definitions of DO_BO_UNPACK and DO_BO_PACK.Nicholas Clark2013-05-201-39/+0
| | | | | | | | | | | | 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.
| * Swap byte order in DO_BO_(UN)?PACK based on a variable needs_swap.Nicholas Clark2013-05-201-4/+19
| | | | | | | | | | | | | | | | | | | | 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.
| * DO_BO_{UN,}PACK can use my_swabn() directly.Nicholas Clark2013-05-202-25/+4
| | | | | | | | | | This removes the only users of my_{be,le,h}to{be,le,h}n, so remove the definitions for those macros.
| * Use DO_BO_{UN,}PACK in place of DO_BO_UNPACK_{N,PC}Nicholas Clark2013-05-201-92/+11
| | | | | | | | Also, eliminate the intermediate macros DO_BO_PACK_PTR and DO_BO_UNPACK_PTR.
| * Eliminate my_{hto[bl]e,[bl]etoh}{16,32,64,s,i,l} as nothing now uses them.Nicholas Clark2013-05-205-519/+0
| |
| * In pp_pack.c, refactor DO_BO_(UN)?PACK to use my_letohn etcNicholas Clark2013-05-201-4/+4
| | | | | | | | | | | | | | | | | | | | 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.)
| * In pp_pack.c, refactor DO_BO_(UN)?PACK_PTR to use my_letohn etcNicholas Clark2013-05-201-4/+4
| | | | | | | | | | | | 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.
| * In pp_pack.c, refactor DO_BO_(UN)?PACK_N to use sizeof() on the variable.Nicholas Clark2013-05-201-4/+4
| | | | | | | | | | | | 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.
| * Refactor macros in pp_pack.c, removing support for mixed-endian byte orders.Nicholas Clark2013-05-201-48/+77
| | | | | | | | | | | | | | | | | | | | 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.
| * Eliminate the conditionally-compiled fallback functions for htonl etc.Nicholas Clark2013-05-205-89/+13
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove buggy loop-based byte swapping code.Nicholas Clark2013-05-202-40/+3
| | | | | | | | | | The irony is that the union-based code special-cased for little endian systems actually works everywhere, even on mixed-endian systems.
| * Update the Win32 miniperl conditional compilation, for the htonl etc changes.Nicholas Clark2013-05-201-14/+6
| | | | | | | | | | | | | | | | | | 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.
| * Fallbacks for ntohl, ntohs, htonl and htons for little endian systems.Nicholas Clark2013-05-201-0/+24
| | | | | | | | | | The host byteorder agnostic functions in util.c are now only used on mixed endian systems.
| * Provide ntohl, ntohs, htonl and htons no-op macros on big endian systems.Nicholas Clark2013-05-203-30/+9
| | | | | | | | | | | | | | | | | | | | | | 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.)
| * Provide vtohl, vtohs, htovl and htovs no-op macros on little endian systems.Nicholas Clark2013-05-203-21/+11
| | | | | | | | | | | | | | | | | | | | | | 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.)
| * vtohl, vtohs, htovl and htovs are no-ops on 64 bit little endian systems.Nicholas Clark2013-05-201-1/+3
| | | | | | | | | | | | | | 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.
| * Eliminate the definitions for DO_BO_PACK_P and DO_BO_UNPACK_P.Nicholas Clark2013-05-201-10/+0
| | | | | | | | | | Commit 07409e015252427f in April 2005 replaced all the uses of these two macros with DO_BO_PACK_PC and DO_BO_UNPACK_PC.
| * Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_SHRIEKSIGNNicholas Clark2013-05-203-87/+11
| | | | | | | | | | | | | | 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.
| * Eliminate pre-5.9.x conditional code for PERL_PACK_CAN_BYTEORDERNicholas Clark2013-05-201-25/+0
|/ | | | | | | 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.
* Merge the reworking of how genpacksizetables.pl is used.Nicholas Clark2013-05-205-256/+265
|\
| * Add regen/genpacksizetables.pl to t/porting/regen.tNicholas Clark2013-05-201-1/+1
| |
| * Move genpacksizetables.pl to regen/genpacksizetables.plNicholas Clark2013-05-203-2/+2
| |
| * Refactor genpacksizetables.pl to use regen/regen_lib.plNicholas Clark2013-05-202-5/+12
| |
| * Extract the generated packprops array into packsizetables.c.Nicholas Clark2013-05-203-249/+251
| | | | | | | | | | | | | | The C source is the output from genpacksizetables.pl Previously it was pasted into pp_pack.c LocalWords: packprops
| * Propagate a change from commit 1651fc447620d361 into genpacksizetables.pl.Nicholas Clark2013-05-201-1/+1
| | | | | | | | | | | | 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.
| * genpacksizetables.pl: Correct comment typoKarl Williamson2013-05-201-1/+1
|/