summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* y///rFather Chrysostomos2010-11-027-16/+67
|
* s///r leaks like a sieveFather Chrysostomos2010-11-022-2/+7
|
* Don’t capitalise words in the middle of an error messageFather Chrysostomos2010-11-022-2/+2
|
* Add transr op typeFather Chrysostomos2010-11-026-3/+18
| | | | | for the upcoming y///r feature. There are not enough flag bits, hence the extra type.
* Avoid multiple $op->private calls in B::Deaprse::pp_transFather Chrysostomos2010-11-021-3/+4
|
* Inline RvDEEPCP() into its only caller, Perl_amagic_call().Nicholas Clark2010-11-022-13/+9
| | | | | | | Only Perl_amagic_call() was using RvDEEPCP() when it was added in 5.000, and I believe that it's never had any other users (in the core, on CPAN, or anywhere else visible to Google codesearch). Hence it seems an ideal candidates to be inlined and eliminated.
* Implement the loop in tryAMAGICunDEREF_var() using while, rather than goto.Nicholas Clark2010-11-021-7/+7
| | | | | | | | Yes, it was a while loop implemented using goto, although this only became clear by untangling the macros. I believe it need never have been implemented as goto, given that the other user of tryAMAGICunW_var "broke" out of the "if"'s block using a return, hence that "if" could have been a "while" all along.
* Expand AMG_CALLun_var() into all its users, and eliminate it.Nicholas Clark2010-11-023-9/+10
| | | | | Aside from the 2 callers where it can be replaced with AMG_CALLun(). AMG_CALLun_var was only used in core.
* Inline tryAMAGICunW_var() into macros tryAMAGICun{DEREF_var,TARGET}Nicholas Clark2010-11-021-28/+36
| | | | | | | This also inlines and eliminates FORCE_SETs and setAGAIN. The three eliminated macros were not referenced from anywhere else. (The core, CPAN, code visible to Google codesearch.)
* Eliminate tryAMAGICunW() by refactoring tryAMAGICun{DEREF,TARGET}Nicholas Clark2010-11-021-4/+2
| | | | | tryAMAGICunW was only used within pp.h itself, and not referenced from anywhere else. (The core, CPAN, code visible to Google codesearch.)
* Remove unused AMAGIC macros from pp.h. Neither core nor CPAN uses any.Nicholas Clark2010-11-021-71/+0
| | | | | | | | | | | | | | | | | | | | Since commit 6f1401dc2acd2a2b, many AMAGIC macros in pp.h are no longer used in core, nor in modules or CPAN, nor in code visible to Google codesearch. Specifically: tryAMAGICbinW_var tryAMAGICbinW tryAMAGICbin_var tryAMAGICbin tryAMAGICbinSET tryAMAGICbinSET_var tryAMAGICbinW_var AMG_CALLbinL tryAMAGICun_var tryAMAGICun tryAMAGICunSET_var tryAMAGICunSET tryAMAGICftest
* Fix RT-70998: qq{\x{30ab}} =~ /\xab|\xa9/ produces warningscompileYves Orton2010-11-021-4/+10
|
* Add test for rt-70998: qq{\x{30ab}} =~ /\xab|\xa9/ produces warningsFather Chrysostomos2010-11-021-1/+38
|
* remove commit bit so that porting tests dont failYves Orton2010-11-020-0/+0
|
* Reorder struct xpvhv_aux to make two I32s adjacent.Nicholas Clark2010-11-021-1/+1
| | | | | | This avoids structure padding on architectures with 64 bit alignment for pointers. For example, on x86_64 it reduces the structure size from 48 to 40 bytes.
* Fix permissions on lib/overload/numbers.pm, accidentally changed by 0e244b13.Nicholas Clark2010-11-021-0/+0
|
* perldelta up to 7fd683ff3c3Father Chrysostomos2010-11-011-1/+17
| | | | I cheated by adding more commit IDs to the exception list.
* Increase DynaLoader’s versionFather Chrysostomos2010-11-011-1/+1
|
* Note changes to perlvar in perldeltabrian d foy2010-11-011-0/+5
|
* Whitespace fixes to perlvarbriandfoy/perlvarbrian d foy2010-11-011-3/+3
|
* Added ${^GLOBAL_PHASE} to perlvarbrian d foy2010-11-011-0/+64
|
* Fix some grammar nits thanks to jnarebbrian d foy2010-11-011-4/+3
|
* Added some missing index entries and fixed some whitespacebrian d foy2010-11-011-15/+19
|
* Get rid of spatial references 'above' and 'before' in perlvarbrian d foy2010-11-011-42/+42
| | | | | | We don't actually know where in space a formatter will put any text, or that the text will be there at all (e.g. perldoc -v)
* Use 'four' instead of 4 in body para in perlvarbrian d foy2010-11-011-1/+1
|
* Make $^V recommendation the first sentence in $]brian d foy2010-11-011-4/+6
|
* Add more English equivalents, index all names in perlvarbrian d foy2010-11-011-33/+46
|
* I think I have perlvar ordered and proper nowbrian d foy2010-11-011-339/+343
|
* Putting the variables in order, mostly, but not completely yetbrian d foy2010-11-011-286/+279
|
* * mjd rewrites the $", cleans up minor bitsbrian d foy2010-11-011-8/+16
|
* * Add the missing $"brian d foy2010-11-011-0/+9
|
* * The first draft of a perlvar reorganizationbrian d foy2010-11-011-1118/+1299
|
* Avoid buffer overflow in dl_win32.cJan Dubois2010-11-012-0/+4
| | | | | This fixes the DynaLoader related part of bug 78710 http://rt.perl.org/rt3//Public/Bug/Display.html?id=78710
* Correct the return type for B::MAGIC::MOREMAGIC.Nicholas Clark2010-11-011-3/+2
| | | | | | | b2adfa9b5e1682df accidentally changed the return type from SV to B::SV. Clearly there aren't enough tests. However, the code prior to b2adfa9b5e1682df was buggy (now fixed) in that it could put a NULL on the perl stack. The stack should only be valid SV pointers.
* Tidy B interpreter struct accessors in B.xsNicholas Clark2010-11-011-18/+17
| | | | | | | | 1: Express B::amagic_generation and B::comppadlist "longhand", rather than creating macros solely for the benefit of xsubpp. 2: As no functions remain needing prefix stripping, eliminate the MODULE definition for B with the PREFIX of B_. 3: Merge the two BOOK blocks.
* tidy code in Perl_sighandler()David Mitchell2010-11-011-14/+13
| | | | | | | | | | | | | | | | | | | 1) compress if (...) flag |= 1 ... if (flag & 1) { ... into if (...) { flag |= 1 .... 2) re-order the flag bits, since over the years some bits have become redundant.
* RT #76248: double-freed SV with nested sig-handlerDavid Mitchell2010-11-016-37/+23
| | | | | | | | | | | | | | | | | | | There was some buggy code in Perl_sighandler() related to getting an SV with the signal name to pass to the perl-level handler function. ` Basically: on threaded builds, a sig handler that died leaked PL_psig_name[sig]; on unthreaded builds, in a recursive handler that died, PL_sig_sv was prematurely freed. PL_sig_sv was originally just a file static var that was not recursion-save anyway, and got promoted to perlvars.h when it should instead have been done away with. So I've got rid of it now, and rationalised the code, which fixed the two issues listed above. Also added an assert which makes the dodgy manual popping of the save stack slightly less dodgy.
* RT 75254: Slow GC after Scalar::Util::weakenDavid Mitchell2010-11-011-19/+42
| | | | | | | | | | | | | | | | | Freeing lots of weak RVs to the same object results in quadratic search through the backrefs array. This is probably sufficiently rare that its not worth the expense of replacing the array with a ptr table (say); but in the meantime, this patch makes the code as tight as possible, and adds a check for the sv being at element 0, so that both types of linear create/destroy order are optimised (previously only created last / deleted first order was quick). It's still slow for random deletion order. The RT code, modified to give high-res timing for the return from the sub, and with various types of destruct order, gives the following timings: LIFO FIFO random before 0.05s 17.37s 17.28s now 0.04s 0.04s 12.05s
* Merge B's interpreter structure accesses for SV* types into intrpvar_sv_common.Nicholas Clark2010-11-011-68/+64
| | | | On this platform this reduces the object size by 4.5K.
* All callers of get_op_bitspec() in Opcode.xs pass len, so don't call strlen().Nicholas Clark2010-11-011-2/+0
| | | | This commit brought to you by the campaign for elimination of strlen().
* Small refactoring of op_names_init() and put_op_bitspec() in Opcode.xsNicholas Clark2010-11-011-7/+3
| | | | | | | | | Change op_names_init() to use memset() rather than a longhand loop, and to call put_op_bitspec() with an explicit length by using STR_WITH_LEN(). As all calls to put_op_bitspec() now pass in a length, remove the code to call strlen() if the passed-in length is zero. This commit brought to you by the campaign for elimination of strlen().
* Refactor Storable::{net_,}pstore to return undef/true, instead of 1 or 0.Nicholas Clark2010-11-012-9/+8
| | | | | | | | This allows their only caller, Storable::_store(), to be simplified, as $ret will now have the correct values for its documented interface. Also, replace C<$ret = undef> with C<undef $ret>, as the latter is equivalent, but uses 1 fewer op.
* Merge the implementation of B::sv_{undef,no,yes} using ALIAS.Nicholas Clark2010-11-011-12/+10
| | | | On this platform, this reduces the object code size by around .75K.
* Refactor the error handling logic in Storable::_store().Nicholas Clark2010-11-011-2/+9
| | | | | | | | | | | | | | | | | | The logic remains: 1: If the close fails, set $ret to undef, and attempt to unlink the file 2: If the eval set $@, attempt to unlink the file 3: If the unlink is attempted and fails, warn However, the new code avoids using low-precedence or and a statement modifier, both for flow control, in the same statement, which I certainly found confusing. It also now avoids the implicit *three*-state logic for $ret, which previously was attaching distinct meanings to true, false and undefined. The new code has (some) flow control inside an if(), and enters a block (which it seems that the old code strove hard to avoid - blocks are a small runtime cost). However the block entry is only for the error case, so this should not matter.
* Remove S_get_isa_hashFather Chrysostomos2010-10-313-21/+6
| | | | It no longer serves much purpose, as of 7311f41d6.
* Allow push/pop/keys/etc to act on referencesDavid Golden2010-10-3119-56/+801
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All built-in functions that operate directly on array or hash containers now also accept hard references to arrays or hashes: |----------------------------+---------------------------| | Traditional syntax | Terse syntax | |----------------------------+---------------------------| | push @$arrayref, @stuff | push $arrayref, @stuff | | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | | pop @$arrayref | pop $arrayref | | shift @$arrayref | shift $arrayref | | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | | keys %$hashref | keys $hashref | | keys @$arrayref | keys $arrayref | | values %$hashref | values $hashref | | values @$arrayref | values $arrayref | | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | |----------------------------+---------------------------| This allows these built-in functions to act on long dereferencing chains or on the return value of subroutines without needing to wrap them in C<@{}> or C<%{}>: push @{$obj->tags}, $new_tag; # old way push $obj->tags, $new_tag; # new way for ( keys %{$hoh->{genres}{artists}} ) {...} # old way for ( keys $hoh->{genres}{artists} ) {...} # new way For C<push>, C<unshift> and C<splice>, the reference will auto-vivify if it is not defined, just as if it were wrapped with C<@{}>. Calling C<keys> or C<values> directly on a reference gives a substantial performance improvement over explicit dereferencing. For C<keys>, C<values>, C<each>, when overloaded dereferencing is present, the overloaded dereference is used instead of dereferencing the underlying reftype. Warnings are issued about assumptions made in the following three ambiguous cases: (a) If both %{} and @{} overloading exists, %{} is used (b) If %{} overloading exists on a blessed arrayref, %{} is used (c) If @{} overloading exists on a blessed hashref, @{} is used
* [perl #78580] Stop a simple *glob from calling get-magicFather Chrysostomos2010-10-312-2/+15
| | | | | | | | This also happens to apply to *{ $::{glob} }, but not to *{\*glob} or *{$thing = *glob}. In other words, it’s only when the operand is a real glob, and not a reference or a SVt_FAKE glob.
* Update parent to CPAN version 0.224Chris 'BinGOs' Williams2010-11-013-7/+11
| | | | | | | | | | | [DELTA] 0.224 20101031 . Change assignment @ISA = (@ISA, 'new::class') to use push @ISA, 'new::class' This should make class creation faster from 5.10 onwards and reverts a change made in 2.14. If this is critically slow for you and you can't upgrade your version of Perl, use the old way.
* perlunicode.pod: Add detail on utf8/locale conflictsKarl Williamson2010-10-311-2/+7
|
* regcomp.h: Remove unused #defineKarl Williamson2010-10-311-3/+0
| | | | | | | | | | | ANYOF_RUNTIME() is no longer used, so can be removed. I had long tried to figure out what the purpose of this was, and discovered it really had none. I think it must have had something to do with locales at one time. But locales don't do well with utf8, and I don't know how to make it better. In any event this wasn't actually accomplishing anything.