| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also, in Perl_sv_magic() merge the case for PERL_MAGIC_dbfile with the others
that return a NULL vtable.
|
| |
|
|
|
|
|
|
|
|
| |
This should reduce the complexity of code dealing with GVs, as they no longer
try to play several different incompatible roles.
(As suggested by Ben Morrow. However, it didn't turn out to be as
straightforward as one might have hoped).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the 256 byte Boyer-Moore table was stored in the buffer of SvPVX()
after the raw string by extending the buffer.
Given that the scalar is alway upgraded to add PERL_MAGIC_bm magic, to clear
the table and other flags, there's no extra memory cost in using mg_ptr in the
MAGIC struct to point directly to the table.
I believe that this removes the last place in the core that stores data beyond
SvCUR().
|
|
|
|
|
|
|
| |
This reduces the complexity of the union declarations in sv.h.
As B.xs is accessing the structures/unions directly, instead of using the
macros, it needs a patch too.
|
| |
|
|
|
|
|
| |
No real-world code would ever end up using a studied scalar as a compile-time
second argument to index, so this isn't a real pessimisation.
|
|
|
|
|
| |
No real-world code would ever end up studying an FBM scalar, so this isn't a
real pessimisation.
|
| |
|
|
|
|
|
|
|
| |
The memory is used for part of the FBM state.
Tidy the order of conditions in the if() determining whether the IV/UV should
be shown.
|
|
|
|
|
|
|
| |
All three functions are private, undocumented, unexported, and un(ab)used by
any code on CPAN. The first two are used in only one place, so inline them.
The third was added in 8960aa876f446ad2, without adding any code which used it,
and it has remained unused ever since.
|
| |
|
| |
|
|
|
|
|
| |
As fh_is_fd() is now used in only one location, inline it. (This function isn't
exported, isn't documented, and isn't (ab)used by anything on CPAN.)
|
|
|
|
|
|
|
| |
IO::Handle accepts either, but open only accepts the latter.
In spawn_with_handles(), hoist the C<require Fcntl> into the only block that
needs it - this avoids loading Fcntl on Win32.
|
|
|
|
|
| |
As C<dup_of_out> is never set on the other two members of @handles, this will
allow code simplification.
|
|
|
|
| |
Switch to 3-arg open where code is changing.
|
| |
|
|
|
|
|
| |
Switch to 3-arg open where code is changing. Additionally, @_ can now be used
in place of @cmd.
|
|
|
|
|
| |
Also convert fileno BAREWORD to fileno \*BAREWORD. These will aid future
refactoring.
|
|
|
|
| |
This avoids having to re-assign to the scalars $dad_wtr and $dad_rdr.
|
|
|
|
|
|
|
|
|
| |
Previously it was passed in as a parameter by IPC::Open2::open2() and
IPC::Open3::open3(), each of which used C<calller> to find it. Move the use of
caller to one place.
It would also be possible to use C<caller> to eliminate the first parameter to
_open3(), but this would add more code than it removes, so doesn't seem wise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously it would fail on Win32, because spawn_with_handles() would attempt
to duplicate all three, ignoring failures at this point, but then report
failure to close any as a fatal error, even if this was because the earlier
dup-ing had failed.
Also avoid a warning in the *nix code path in open3() if STDERR is localized
(and hence fileno STDERR is undefined).
|
|
|
|
|
| |
This allows testing of the (normally) Win32 and OS/2 specific code paths in
IPC::Open3::open3().
|
|
|
|
|
|
|
|
| |
The code for STDIN and STDOUT never ends up needing to duplicate a reference.
The code for STDERR can, because of the earlier special case code to save
STDOUT. It was special-cased to use fileno in commit 8b3e92c60014b4e7, in 1998.
This was before 3 argument open. With 3 argument open the special case can be
avoided.
|
|
|
|
| |
Previously it could only perform 2 argument open.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original bug was a request that errors be reported in the parent process,
with a TODO test, and then a patch that added the feature for the !DO_SPAWN
case, and removed the TODO. The *implication* of the bug report and the way the
original test was only TODO for the !DO_SPAWN case was that errors were
reported inconsistently between the two code paths of open3().
However, this is not the case - the DO_SPAWN path through open3() return a
(pseudo) PID (and no error) when asked to run a non-existent program. Hence
there is now a feature discrepancy between the alternative implementations,
which feels like a bug that should (ultimately) be addressed.
The original test could have expressed that more directly with one code path
and a TODO. The refactoring of bd29e8c290c68f4f failed to spot this, and
introduced new logic errors in the DO_SPAWN path - waitpid() should not be
called if $@ is set.
Set $pid outside the eval {} - this makes sure it is (re)set to undef if the
eval fails, instead of holding its previous (now bogus) value.
|
|
|
|
| |
keys doesn’t actually use it yet, but it will soon.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Opening a file handle to \$glob causes assertion failures
(under debugging) or hangs or other erratic behaviour without
debugging. This might even crash in some cases.
It never really worked properly, but it didn’t start hanging
apparently until 5.12.2 and 5.14.0.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we carry out this test on SH4, it becomes the time-out.
2 seconds are set in watchdog, but are too short for SH4.
This patch was changed for 10 seconds.
$ time ./perl t/re/re.t
1..19
ok 1 - is_regexp(REGEXP ref)
ok 2 - is_regexp(REGEXP)
ok 3 - is_regexp("")
ok 4 - regexp_pattern[0] (ref)
ok 5 - regexp_pattern[1] (ref)
ok 6 - scalar regexp_pattern (ref)
ok 7 - regexp_pattern[0] (bare REGEXP)
ok 8 - regexp_pattern[1] (bare REGEXP)
ok 9 - scalar regexp_pattern (bare REGEXP)
ok 10 - !regexp_pattern("")
ok 11 - regnames
ok 12 - regnames
ok 13 - regnames in scalar context
ok 14 - regnames
ok 15
ok 16
ok 17
ok 18
ok 19 - Didn't loop
real 0m7.482s
user 0m3.848s
sys 0m0.036s
|
|
|
|
| |
(broken by 767eda4)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes autovivification work with lvalue subs. It follows
the same technique used by other autovivifiable ops (aelem, helem,
tc.), except that, due to flag constraints, it uses a single flag and
instead checks the op tree at run time to find out what sort of thing
to vivify.
The flag constraints are that these two flags:
#define OPpENTERSUB_HASTARG 32 /* Called from OP tree. */
#define OPpENTERSUB_NOMOD 64 /* Immune to op_lvalue() for :attrlist. */
conflict with these:
#define OPpDEREF (32|64) /* autovivify: Want ref to something: */
#define OPpDEREF_AV 32 /* Want ref to AV. */
#define OPpDEREF_HV 64 /* Want ref to HV. */
#define OPpDEREF_SV (32|64) /* Want ref to SV. */
Renumbering HASTARG and NOMOD is problematic, as there are places in
op.c that change entersubs into rv2cvs, and the entersub and rv2cv
flags would conflict. Setting the flags correctly when changing the
type is hard and would result in subtle bugs if not done perfectly.
Ops like ${...} don’t actually autovivify; it’s the op inside that
does it. In those cases, the parent op is flagged with OPpDEREFed, and
it skips get-magic, as it has already been called by the inner op.
Since entersub is now marked as being an autovivifying op, ${...} in
lvalue context ends up skipping get-magic if there is a foo() inside.
And this affects even regular subs. So pp_leavesub and pp_return have
to call get-magic; hence the new tests in gmagic.t.
|
|
|
|
| |
See the commit message of d4ddbae for detail.
|
|
|
|
|
|
| |
One should always generate the golden B::Concise output with PERL_UNICODE set
so that ${^OPEN} is set, as the test system knows how to take it out, not put
it in.
|
|
|
|
|
| |
This should fix the recent new failure in the VMS smokes
(since 2f77d7b).
|
|
|
|
|
|
|
| |
test arithmetic folding, conditional folding (both true & false),
and string, lc() & uc() folds, and mixed string.int folds.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
|
| |
|
|
|
|
|
| |
including the ‘Useless assignment to a temporary’ warning
which is only triggered by these.
|
|
|
|
|
|
| |
When this test was written, t the new 5.14 regex modifiers were
not usable in suffix notation. That changed before 5.14 shipped,
but the test did not.
|
|
|
|
| |
Snow Leopard is Darwin 10, which compares less than 6 lexicographically.
|
|
|
|
|
| |
Original comments, partially incorrect, added in 5a44e503dc748f53 and
f4c3658468ba5234.
|