summaryrefslogtreecommitdiff
path: root/overload.h
Commit message (Collapse)AuthorAgeFilesLines
* [perl #114864] Don’t use amt for DESTROYFather Chrysostomos2012-11-171-1/+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.
* Change close_and_rename() to read_only_bottom_close_and_rename()Nicholas Clark2011-01-231-0/+1
| | | | | | | | | | 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.
* Move all the generated file header printing into read_only_top()Nicholas Clark2011-01-231-2/+3
| | | | | | | | | 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-69/+69
| | | | makes debugging marginally easier!
* regen/overload.pl: add comments to overload.[ch]David Mitchell2011-01-031-71/+71
| | | | | | 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-1/+1
|
* Add a new overload type, "qr".Ben Morrow2009-11-011-0/+1
|
* Run overload.pl.Ben Morrow2009-03-251-0/+1
|
* PL_AMG_names is only used by gv.c (as far as Google code search canNicholas Clark2007-10-161-82/+2
| | | | | | | see), so it can easily be a static variable inside gv.c. This allows the implementation to be changed in future Perls within the 5.10.x series. p4raw-id: //depot/perl@32116
* Generate the overload enum and names array programatically, whichNicholas Clark2006-10-061-0/+168
allows experimentation with the order. The new order shaves nearly 900 bytes from gv.o, because the compiler can make smaller branch tables for switch statements. p4raw-id: //depot/perl@28950