summaryrefslogtreecommitdiff
path: root/regen/overload.pl
Commit message (Collapse)AuthorAgeFilesLines
* Patch unit tests to explicitly insert "." into @INC when needed.H.Merijn Brand2016-11-111-1/+1
| | | | | require calls now require ./ to be prepended to the file since . is no longer guaranteed to be in @INC.
* overload.c -> overload.incJarkko Hietaniemi2015-07-221-2/+2
|
* Add overload types for string-specifc bitopsFather Chrysostomos2015-01-311-0/+7
|
* [perl #114864] Don’t use amt for DESTROYFather Chrysostomos2012-11-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | DESTROY has been cached in overload tables since perl-5.6.0-2080-g32251b2, making it 4 times faster than before (over- load tables are faster than method lookup). But it slows down symbol lookup on stashes with overload tables, because overload tables use magic, and SvRMAGICAL results in calls to mg_find on every hash lookup. By reusing SvSTASH(stash) to cache the DESTROY method (if the stash is unblessed, of course, as most stashes are), we can avoid making all destroyable stashes magical and also speed up DESTROY lookup slightly more. The results: • 10% increase in stash lookup speed after destructors. That was just testing $Foo::{x}. Other stash lookups will have other overheads that make the difference less impressive. • 5% increase in DESTROY lookup speed. I was using an empty DESTROY method to test this, so, again, real DESTROY methods will have more overhead and less speedup.
* Add an optional third argument to open_new(), to invoke read_only_top() with.Nicholas Clark2011-05-191-14/+9
| | | | Merge together many calls to open_new() and read_only_top().
* Rename safer_open() to open_new(), and eliminate the first parameter.Nicholas Clark2011-05-191-3/+3
| | | | Update the SHA256s where necessary in the generated files.
* In regen scripts, print to explicit file handles instead of using select.Nicholas Clark2011-01-231-10/+6
| | | | | Also put explicit quotes on heredoc declarations to show whether they should interpolate, merge some heredocs, and remove & from calls to &tab(...)
* Change close_and_rename() to read_only_bottom_close_and_rename()Nicholas Clark2011-01-231-6/+3
| | | | | | | | | | All users of close_and_rename() were printing out the appropriate "ex: set ro:" string to the file handle immediately before closing it. So move that into the common function and rename it to reflect what it now does. [Except overload.pl, which should have been, given that it calls read_only_top()] Print a newline above the "ex: set ro:" line. This removes many newlines from the regen scripts, but does add newlines to a couple of generated files.
* In regen/*.pl, refactor the repeated code for close and rename if different.Nicholas Clark2011-01-231-9/+6
| | | | | | | Pass the final file name as an optional second argument of safer_open() and store it with the file handle. Add a function close_and_rename() which closes the file handle, then retrieves the final name, and renames the temporary file if the two differ.
* regen/overload.pl should use rename_if_different() for lib/overload/numbers.pmNicholas Clark2011-01-231-2/+2
| | | | | | It was the only file generated by any of the regen/*.pl scripts which was always written out directly, instead of first creating a temporary file, and only moving that if successfully generated (and different).
* Move all the generated file header printing into read_only_top()Nicholas Clark2011-01-231-40/+10
| | | | | | | | | Previously all the scripts in regen/ had code to generate header comments (buffer-read-only, "do not edit this file", and optionally regeneration script, regeneration data, copyright years and filename). This change results in some minor reformatting of header blocks, and standardises the copyright line as "Larry Wall and others".
* add enum index in overload.h commentsDavid Mitchell2011-01-141-1/+2
| | | | makes debugging marginally easier!
* regen/overload.pl: add comments to overload.[ch]David Mitchell2011-01-031-4/+18
| | | | | | In the auto-generated overload.c and overload.h files, add a comment to each line mapping from the method name to the enumeration name and vice-versa.
* overload.pl -> regen/overload.plFather Chrysostomos2010-10-131-2/+2
|
* Move regen scripts to regen/Steffen Mueller2010-10-101-0/+232
Moves the various scripts that are called by regen.pl to a subdirectory to reduce clutter.