| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Fix all the tests that were using quotes, and (by implication) working
because barewords are treated as strings, and one-liners aren't run under
strict.
|
|
|
|
|
|
| |
There is a line in this .t which uses the old regex stringification.
The contents are not currently tested for, but for cleanliness, change
to the new.
|
|
|
|
| |
I overlooked these earlier in adding the caret notation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, in code such as
use constant DEBUG=>0;
sub GAK {
warn if DEBUG;
print "stuff\n";
}
the ops for C<warn if DEBUG;> would be folded to a null op (ex-const), but
the nextstate op would remain, resulting in a runtime op dispatch of nextstate,
nextstate, ...
The execution of a sequence of nexstate ops is indistinguishable from just the
last nextstate op, so teach the peephole optimiser to eliminate the first of a
pair of nextstate ops. (Except where the first carries a label, as labels
mustn't be eliminated by the optimiser, and label usage isn't conclusively
known at compile time.)
|
|
|
|
|
|
|
|
|
|
|
| |
op.h and regexp.h share common elements in their data structures. They
have had to manually be kept in sync. This patch makes it easier by
putting those common parts into a common header #included by the two.
To do this, it seemed easiest to change the symbol definitions to use
left shifts to generate the flag bits. But this meant that regcomp.pl
and axt/B/defsubs_h.PL had to be taught to recognize those forms of
expressions, done in separate commits
|
|
|
|
| |
Allow #defines which have left shift operators in them.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit made various ops such as rv2av unconditionally do
an SvGETMAGIC(). Under some circumstances this could cause a double
mg_get() (and hence double FETCH etc). In particular, when the
proceeding op was something like aelem with OPpDEREF, the aelem would
call vivify_ref(), which would call magic. So in peep(), mark
OP_RV2[SAH]V ops with the new OPpDEREFed flag if the preceding op was
OPpDEREF. Then use this flag to avoid a second dose of magic.
Note that RV2GV probably needs this flag too, but there weren't any
spare private flag bits left for that op (I think).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes s/// so that it doesn't act destructively on its target.
Instead it returns the result of the substitution (or the original string if
there was no match).
In addition this patch:
* Adds a new warning when s///r happens in void context.
* Adds a error when you try to use s///r with !~
* Makes it so constant strings can be bound to s///r with =~
* Adds documentation.
* Adds some tests.
* Updates various debug code so it knows about the /r flag.
* Adds some new 'r' words to B::Deparse.
|
| |
|
| |
|
|
|
|
|
| |
than EXPORT as they're new functions which clobber symbols in downstream
CPAN modules.
|
|
|
|
| |
And bump the $VERSION.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
return value of sprintf().
Brought to you by the Campaign for the Elimination of strlen().
(And the elimination of accidental bugs due to typos in lengths of constant
strings.)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by, and in parts borrows from, Schwern's branch on github, but takes a
slightly different approach in places.
Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME
needs fixing, and the changes to dual-life modules' tests need to be filtered
back upstream, and possibly modified to suit their respective authors.
But it works.
|
|
|
|
|
| |
The Perl Compilers are for some time in B::C and not B. B is only the
backend.
|
|
|
|
|
|
|
| |
(Because constants and other Proxy Constant Subroutines are stored in the
symbol table as references, and in 5.11.0 RVs merged with IVs, and B::Deparse
knows that an IV in the symbol table is a stub declaration for a subroutine
with no prototype, so B::Deparse "knew" that that's what it was.)
|
| |
|
|
|
|
|
|
|
| |
commit 2990415a45 improved the ability to deparse inlined constants,
but at the cost of having to walk all the symbol tables when each new
B::Deparse object is created. Make this scan instead only happen the first
time its needed.
|
| |
|
|
|
|
|
| |
* differ between 5.10.0 and maint-5.10, or
* differ between 5.8.9 and maint-5.10
|
| |
|
| |
|
|
|
|
| |
now, like whitespace)
|
| |
|
|
|
|
|
| |
Remove some orphaned trailing quotes from TODO message that are no longer
conditional code.
|
| |
|
| |
|
|
|
|
| |
SKIPs.
|
| |
|
| |
|
|
|
|
|
| |
Since concise-xs.t uses IO::Socket as a source for its testing, we need
to list correctly all function it exports.
|