| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
kvaslice operator that imlements %a[0,2,4] syntax which
result in list of index/value pairs. Implemented in
consistency with "key/value hash slice" operator.
|
|
|
|
|
|
| |
kvhslice operator that implements %h{1,2,3,4} syntax which
returns list of key value pairs rather than just values
(regular slices).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This single op can, in some circumstances, replace the sequence of a
pushmark followed by one or more padsv/padav/padhv ops, and possibly
a trailing 'list' op, but only where the targs of the pad ops form
a continuous range.
This is generally more efficient, but is particularly so in the case
of void-context my declarations, such as:
my ($a,@b);
Formerly this would be executed as the following set of ops:
pushmark pushes a new mark
padsv[$a] pushes $a, does a SAVEt_CLEARSV
padav[@b] pushes all the flattened elements (i.e. none) of @a,
does a SAVEt_CLEARSV
list pops the mark, and pops all stack elements except the last
nextstate pops the remaining stack element
It's now:
padrange[$a..@b] does two SAVEt_CLEARSV's
nextstate nothing needing doing to the stack
Note that in the case above, this commit changes user-visible behaviour in
pathological cases; in particular, it has always been possible to modify a
lexical var *before* the my is executed, using goto or closure tricks.
So in principle someone could tie an array, then could notice that FETCH
is no longer being called, e.g.
f();
my ($s, @a); # this no longer triggers two FETCHES
sub f {
tie @a, ...;
push @a, 1,2;
}
But I think we can live with that.
Note also that having a padrange operator will allow us shortly to have
a corresponding SAVEt_CLEARPADRANGE save type, that will replace multiple
individual SAVEt_CLEARSV's.
|
|
|
|
|
|
| |
This will be used for cloning a ‘my’ sub on scope entry.
I was going to use pp_padcv for this, but it would end up having a
top-level if/else.
|
|
|
|
|
| |
This will be used for introducing ‘my’ subs on scope entry, by turning
off the stale flag.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 6ea72b3a1, rv2hv and padhv have had the ability to return boo-
leans in scalar context, instead of bucket stats, if flagged the right
way. sub { %hash || ... } is optimised to take advantage of this. If
the || is in unknown context at compile time, the %hash is flagged as
being maybe a true boolean. When flagged that way, it returns a bool-
ean if block_gimme() returns G_VOID.
If rv2hv and padhv can already do this, then we don’t need the
boolkeys op any more. We can just flag the rv2hv to return a boolean.
In all the cases where boolkeys was used, we know at compile time that
it is true boolean context, so we add a new flag for that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with the simple_casefolding and full_casefolding features.
fc() stands for foldcase, a sort of pseudo case (like lowercase),
which is used to implement Unicode casefolding. It maps a string
to a form where all case differences are erased, so it's a
locale-independent way of checking if two strings are the same,
regardless of case.
This functionality was, and still is, available through the
regular expression engine -- /i matches would use casefolding
internally. The fc keyword merely exposes this for easier access.
Previously, one could attempt to case-insensitively test two strings
for equality by doing
lc($a) eq lc($b)
But that might get you wrong results, for example in the case of
\x{DF}, LATIN SMALL LETTER SHARP S.
|
|
|
|
|
| |
After much alternation, altercation and alteration, __SUB__ is
finally here.
|
|
|
|
| |
They were nearly identical.
|
|
|
|
|
| |
They are almost identical. This gives the compiler less code
to digest.
|
|
|
|
| |
&CORE::foo subs will use this operator for sorting out @_.
|
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
| |
Unlike set{host,net,proto,serv}ent, set{gr,pw}ent don't have stayopen
parameter, hence their "signature" is the same as the ent*ent functions.
|
| |
|
|
|
|
|
|
|
| |
PL_op_desc[] rather than PL_op_name(), as the OPs are internally named e*ent,
but implement the ent*ent functions, and when unimplemented report themselves
using the function name. No need for OP_DESC(), as the switch statement means
that we can't encounter OP_CUSTOM.
|
|
|
|
|
| |
Previously syswrite was an alias for send. However, syswrite is always
available, whereas send is not implemented if HAS_SOCKET is not defined.
|
|
|
|
|
|
|
| |
It now generates prototypes for all functions that implement OPs. Hence
Perl_unimplemented_op no longer needs a special-case prototype. As it is now
generating a prototype for Perl_do_kv, no need for regen/embed.pl to duplicate
this. Convert the last two users of the macro do_kv() to Perl_do_kv(aTHX).
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
locations that relied on them.
regen/opcode.pl now generates prototypes for the PP functions directly, into
pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
this, removing the only ordering dependency in the regen scripts. opcode.pl
is now responsible for prototypes for pp_* functions. (embed.pl remains
responsible for ck_* functions, reading from regen/opcodes)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make embed.pl fully responsible for generating prototypes and embedding macros
for pp_* and ck_* functions, placing them in embed.h and proto.h
opcode.pl no longer generates pp_proto.h
Remove the (effectively) duplicate explicit entries for (all but 2) ck_*
functions from embed.fnc
We can't actually remove pp_proto.h from the distribution *yet*, as
ExtUtils::MM_Unix and ExtUtils::MM_VMS have hardcoded lists of the installed
headers. Once this is resolved, we can.
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Message-ID: <47B60D72.50708@profvince.com>
Date: Fri, 15 Feb 2008 23:08:50 +0100
p4raw-id: //depot/perl@33356
|
|
|
| |
p4raw-id: //depot/perl@33338
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Plus MAD fixes.
p4raw-id: //depot/perl@30750
|
|
|
| |
p4raw-id: //depot/perl@29727
|
|
|
|
|
|
| |
Subject: 28325/6 break DateTime::Format::Strptime
Message-ID: <877ixs6oa6.fsf@k75.linux.bogus>
p4raw-id: //depot/perl@29324
|
|
|
|
|
|
|
|
| |
Message-ID: <lrek2t1e8n.fsf@caliper.activestate.com>
with tweaks so "say;" continues to default to $_
plus a regression test
p4raw-id: //depot/perl@29187
|
|
|
|
|
|
| |
This copies the mechanism used by truncate().
Fixes bug #38457.
p4raw-id: //depot/perl@27125
|
|
|
|
|
| |
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@22433
|
|
|
| |
p4raw-id: //depot/perl@22328
|
|
|
|
|
|
|
| |
defaults to $_ at compile-time, instead of run-time (like all
other primitives that default to $_).
p4raw-link: @18751 on //depot/perl: 13dcffc60adeca175c32a1ea11ec8756d4853ad2
p4raw-id: //depot/perl@22047
|
|
|
|
|
|
| |
From: "Brent Dax" <brentdax@cpan.org>
Message-id: <000001c234a1$d1ca72c0$6501a8c0@deepblue>
p4raw-id: //depot/perl@17682
|
|
|
|
|
| |
Message-Id: <011019174427.d749b@DUPHY4.Physics.Drexel.Edu>
p4raw-id: //depot/perl@12513
|
|
|
| |
p4raw-id: //depot/perl@11285
|
|
|
|
|
|
| |
Subject: Re: [PATCH] mkdir() mode argument is missing initial 0
Message-ID: <20010706012632.A28327@lustre.dyn.wiw.org>
p4raw-id: //depot/perl@11166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
per-cop, not per-op; plus retweak the locale.t to always
list the skipped utf8 locales.
p4raw-link: @10412 on //depot/maint-5.6/perl: 71d0b827413df9e881d1c54d2d968823ed50c75b
p4raw-id: //depot/perl@10413
p4raw-edited: from //depot/maint-5.6/perl@10411 'edit in'
t/pragma/locale.t (@8600..)
p4raw-integrated: from //depot/maint-5.6/perl@10411 'merge in'
lib/locale.pm (@5902..) opcode.h pp.sym pp_proto.h (@8620..)
opcode.pl (@8998..) op.h perl.h (@9288..) pp_sys.c (@9524..)
util.c (@9538..) embed.h (@9584..) op.c (@9950..) pp.c
(@10091..) pp_ctl.c (@10100..)
|
|
|
|
|
|
|
|
|
|
| |
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: <14941.16925.736415.785818@soda.csua.berkeley.edu>
p4raw-id: //depot/perl@8417
|
|
|
| |
p4raw-id: //depot/perl@7123
|
|
|
|
|
| |
op_private (from Charles Lane <lane@DUPHY4.Physics.Drexel.Edu>)
p4raw-id: //depot/perl@5816
|
|
|
|
|
| |
semantics; the pragma sets defaults for both open() and qx//
p4raw-id: //depot/perl@5628
|
|
|
|
|
| |
by Mark-Jason Dominus <mjd@plover.com>)
p4raw-id: //depot/perl@4083
|