| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use set_up_inc when require.pl is loaded
move plan outside of BEGIN block
when no tests are run at BEGIN time.
Using set_up_inc allow to run these tests under minitest
but also compile them using B::C.
This also has the advantage to use a single
control point for @INC setup.
Note: some tests cannot use 'require test.pl',
unshfit is then used for them.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In push @a, last, it can try to return the @a, copying it like a sca-
lar in the process, resulting in Bizarre copy of ARRAY in last.
In do{{&{sub{"Just another Perl hacker,\n"}},last}}, it returns "Just
another Perl hacker,\n".
The former is clearly a bug. The latter depends on a side-effect of
the same bug.
‘last’ really should not be trying to return the values that the same
statement has accumulated so far.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions have been allowing arbitrary expressions, but would
treat anything that did not resolve to a const op as the empty string.
Not only were arguments swallowed up without warning, but constant
folding could change the behaviour. Computed labels are allowed for
goto, and there is no reason to disallow them for these other ops.
This can also come in handy for certain types of code generators.
In the process of modifying pp functions to accept arbitrary labels,
I noticed that the label and loop-popping code was identical in three
functions, so I moved it out into a separate static function, to make
the changes easier.
I also had to reorder newLOOPEX significantly, because code under the
goto branch needed to a apply to last, and vice versa. Using multiple
gotos to switch between the branches created too much of a mess.
I also eliminated the use of SP from pp_last, to avoid copying the
value back and forth between SP and PL_stack_sp.
|
|
|
|
|
|
|
|
|
|
| |
If the expression in while (EXPR) is a false constant, just return that
constant expression rather than OP_NULL during optimization.
Doesn't handle until loops yet, because "until (1)" is converted to
"while (!1)" by the parser, and so "!1" is already constant-folded to ''
by the time the while loop optree is constructed. Not sure what to do
about that.
|
|
|
|
|
|
|
|
| |
The code that compared non UTF-8 labels neglected to check that
the label's length was equal before comparing them with a memEQ,
which lead to code that used labels with the same prefixes to fail:
./perl -Ilib -E 'CATCH: { CATCHLOOP: { last CATCH; } die }'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix for [perl #21469]:
since the GP may be pulled from under us and freed, coredumps and strange
things can happen.
Fix this by storing a pointer to the GV in the loop block, rather than a
pointer to the GvSV slot. The ITHREADS variant already stores GV rather
than than &GvSV; extend this to non-threaded builds too.
Also, for both threaded and non-threaded, it used to push &GvSV on the
save stack. Fix this by introducing a new save type, SAVEt_GVSV.
This behaves similarly to SAVEt_SV, but without magic get/set.
This means that
for $package_var (...)
is now close in behaviour to
local $package_var = ...
(except for the magic bit).
|
|
|
|
|
| |
Message-ID: <4450FBB8.8070203@landgren.net>
p4raw-id: //depot/perl@27991
|
|
|
|
|
|
| |
The 'for (reverse @a)' optimisation got its index wrong when
create LVALUE SVs for undef elements
p4raw-id: //depot/perl@26195
|
|
|
|
|
|
|
| |
In the presence of 'my' in the conditional of a while(), until(),
or for(;;) loop, add an extra scope to the body so that redo
doesn't undef the lexical
p4raw-id: //depot/perl@24412
|
|
|
|
|
| |
make sure redo always frees temps
p4raw-id: //depot/perl@22438
|
|
|
|
|
| |
Message-ID: <20010414221359.A413@blackrider.blackstar.co.uk>
p4raw-id: //depot/perl@9711
|
|
for(;;)-loop
Message-ID: <20010314004345.A15892@puffinry.freeserve.co.uk>
p4raw-id: //depot/perl@9139
|