| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Generate OP_IS_DIRHOP like other OP_IS_* macros,
use in gv.c:Perl_gv_add_by_type().
Modifies 'F' operand type to 'DF'.
This yields a micro-optimization.
|
|
|
|
|
|
|
| |
other macros are written by regen/opcode.pl into opnames.h
Generate OP_IS_NUMCOMPARE the same way, and get a micro-optimization.
Adds a new 'S<' operand type for the numeric comparison ops.
Needs make regen.
|
|
|
|
| |
&CORE::foo subs will use this operator for sorting out @_.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6a077020aea1c5f0 extended the OP_AELEMFAST optimisation to lexical arrays.
Previously OP_AELEMFAST was only used as an optimisation for OP_GV, which is a
PADOP/SVOP.
However, by reusing the same opcode, and signalling (pad) lexical vs package,
it introduced a myriad of special cases, because OP_PADAV is a BASEOP (not a
PADOP), whilst OP_AELEMFAST is a PADOP/SVOP (which is larger).
Using two OP numbers allows each variant to have the correct OP flags in
PL_opargs. Both can continue to share the same C code.
|
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
| |
Whilst it is possible to open regen/opcode.pl and parse it to find the __END__
token, it's not the cleanest approach.
|
| |
|
|
|
|
|
| |
for the upcoming y///r feature. There are not enough flag bits,
hence the extra type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
This breaks binary compatibility.
|
|
|
|
|
|
|
|
|
|
|
| |
Thread was "[PATCH] Make if (%hash) {} act the same as if (keys %hash) {}"
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-11/msg00432.html
but the implementation evolved from the approach described in the subject, to
instead add a new opcode pp_boolkeys, to exactly preserve the existing
behaviour.
Various conflicts with the passage of time resolved, 'register' removed, and a
$VERSION bump.
|
|
|
| |
p4raw-id: //depot/perl@34587
|
|
|
|
|
|
| |
From: "Jim Cromie" <jim.cromie@gmail.com>
Message-ID: <cfe85dfa0802101152n4e1b9e07pc7fb7ad9241a9794@mail.gmail.com>
p4raw-id: //depot/perl@33364
|
|
|
|
|
|
| |
Message-ID: <47B60D72.50708@profvince.com>
Date: Fri, 15 Feb 2008 23:08:50 +0100
p4raw-id: //depot/perl@33356
|
|
|
|
|
|
| |
Message-ID: <47ADBF3B.2050108@gmail.com>
Date: Sat, 09 Feb 2008 07:56:59 -0700
p4raw-id: //depot/perl@33267
|
|
|
| |
p4raw-id: //depot/perl@33072
|
|
|
|
|
|
| |
Documentation needed, FIXME for proper 64 bit support of arrays longer
than 2**32, re-order the new ops at the end if merging to 5.10.x.
p4raw-id: //depot/perl@32680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
START block. First time through, call slosh() and assign to $zok.
Subsequently neither call slosh() nor assign to $zok. Adds a new op
ONCE to control the conditonal call and assign. No change to list
context, so state ($zok) = slosh() and (state $zok) = ... etc will
still repeatedly evaluate and assign. [Can't fix that before 5.10]
Use as an RVALUE is as Larry's design - my $boff = state $zok = ...;
will evaluate, assign and return first time, and subsequently act as if
it were written my $boff = $zok;
FIXME - state $zok = ...; won't deparse - I believe op->op_last isn't
being correctly set on the sassign, but I don't know how to fix this.
This change may be backed out before 5.10.
p4raw-id: //depot/perl@31798
|
|
|
|
|
| |
logical groups.
p4raw-id: //depot/perl@30784
|
|
|
| |
p4raw-id: //depot/perl@29727
|
|
|
|
|
| |
branch table corresponding to a switch statement slightly smaller.
p4raw-id: //depot/perl@29251
|
|
|
| |
p4raw-id: //depot/perl@26736
|
|
|
|
|
| |
Message-Id: <20051217204431.GB28940@rpc142.cs.man.ac.uk>
p4raw-id: //depot/perl@26400
|
|
|
|
|
|
| |
in read-only mode. Make vi modelines compatible with non-vim
vi versions.
p4raw-id: //depot/perl@24445
|
|
|
| |
p4raw-id: //depot/perl@22509
|
|
|
|
|
|
|
| |
(Lots of Perl 5 source code archaeology was involved.)
Larry didn't make strangled noises when I showed him
the patch, either :-)
p4raw-id: //depot/perl@19242
|
|
|
| |
p4raw-id: //depot/perl@18801
|
|
|
|
|
|
| |
From: "Brent Dax" <brentdax@cpan.org>
Message-id: <000001c234a1$d1ca72c0$6501a8c0@deepblue>
p4raw-id: //depot/perl@17682
|
|
|
|
|
|
| |
be found in the repository, which is most often not right,
but at least consistent)
p4raw-id: //depot/perl@14400
|
|
|
| |
p4raw-id: //depot/perl@11760
|
|
|
|
|
|
|
|
|
|
| |
open($fh,"|-",@array);
to be implemented
i.e. mark pp_open as needing a stack mark, and make pp_open
process its args in that style (and pass them _all_ to tied handles OPEN).
Invent do_openn() which takes SV ** at allow it to see multiple args.
Note this does not _do_ anything yet.
p4raw-id: //depot/perlio@8484
|
|
|
|
|
|
|
| |
Message-ID: <20001205124431.E74518@plum.flirble.org>
Use report_evil_fh().
p4raw-id: //depot/perl@7990
|
|
|
|
|
| |
that are hopefully soon put into use.
p4raw-id: //depot/perl@6498
|
|
|
|
|
|
| |
version of patch suggested by Ilya Zakharevich, which in turn
is based on the one suggested by Tuomas J. Lukka <lukka@iki.fi>)
p4raw-id: //depot/perl@4081
|
|
<spider@leggy.zk3.dec.com>)
p4raw-id: //depot/perl@3902
|