| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
OPpENTERSUB_NOMOD was always set in combination with OPf_WANT_VOID
which is now used to not propagate the lvalue context, making
OPpENTERSUB_NOMOD redundant.
|
|
|
|
|
|
|
|
|
|
|
| |
context.
Children list ops might be in void context because the list is in scalar
context. A test that discarded elements in a list are not assigned lvalue
context is added.
Children of a list op might also be in void context because they are
special entersub ops for attributes. This patch makes the
OPpENTERSUB_NOMOD flag redundant.
|
|
|
|
| |
and bump IO::Socket version.
|
|
|
|
|
|
|
|
|
|
| |
is busy or in non existing port
For non blocking socket, it a timeout has been specified, IO::Socket internally use select(..) to
detect the result of socket connection. In situation, where remote end is busy or in non-existing port, we spend
entire timeout mentioned in select(..) call. We cannot completely differentiate if error is WSAECONNREFUSED(10061) or
WSAETIMEDOUT(10060) in this situation. If we use the exception set in select(..) call, we can do early return and also
a make a clear differentiation in error condition. This is same like what Linux handle in this situation.
|
| |
|
|
|
|
|
|
| |
These two are now supported. They were not before, because their
prototypes gave them unary precedence, even though these ops both
have list precedence. That was corrected in the previous commit.
|
|
|
|
|
| |
They parse as list operators, but their prototypes imply unop
precedence.
|
|
|
|
|
| |
This has worked this way for yonks. It is actually useful, so it might
as well be documented.
|
|
|
|
| |
optimizer to scalarvoid
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 'blead' of ssh://perl5.git.perl.org/perl: (198 commits)
CORE.pod: fix nit grammar
podcheck.t pod grammar fix
Make lock(&foo) syntax nominally lock the subroutine
Forgot one in d677d0fca41325ba7203de00652fdeb43659754a.
Write some missing version strings in configure.com
Correct some format strings in configure.com.
Improve comments about op_private bits. And move the non op specific flags to the top.
get authors.t passing again
Update AUTHORS file and convert from Latin-1 to UTF-8
perldiag.pod on defined %hash
perldelta for &CORE::foo
Update core_prototype’s docs
Move pp_-specific code out of core_prototype
Change core_prototype to take a keyword num
Add tests for precedence of CORE:: subs
Add inlinable &CORE::functions
Make core_prototype provide the op number as well
Make sure the CORE package is always called CORE
Remove select’s prototype
B::Terse and B::Xref were missing some documentation.
...
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 5.10, lock(&foo) was an error for non-lvalue subs. For lvalue
subs, it passed &foo to the lockhook and return \&foo.
In 5.12, lock(&foo) was still an error for non-lvalue subs. For
lvalue subs, it would pass &foo to the lockhook and then either
trip an assertion (-DDEBUGGING) or return &foo, resulting in inter-
esting bugs.
Commit f4df43b5e changed lock(&lvalue_sub) to call the sub and lock
its return value.
As Reini Urban pointed out in
<CAHiT=DE5cVZbuCR3kb=Q5oCa18vo3jr5jZKmURHYha2PwF4pEQ@mail.gmail.com>,
locking a subroutine does have its uses.
Since lock(&foo) has never really worked anyway, we can still
change this.
So, for lvalue subs, this reverts back to the 5.10 behaviour. For
non-lvalue subs, it now behaves the same way, the lvalue flag making
no difference. Note that it still causes an error at run-time, if
threads::shared is loaded, as its lockhook is conservative in what
it accepts.
But this change allows for future extensibility, unlike f4df43b5e.
A note about the implementation: There are two pieces of code (at
least) in op.c that convert an entersub op into an rv2cv, one in
S_doref and the other in Perl_op_lvalue_flags. Originally (before
f4df43b5e) it was S_doref that took care of that for OP_LOCK. But
Perl_op_lvalue_flags is called first, so it would assume it was an
assignment to a sub call and croak if there was no lvalue sub in the
symbol table. This commit adds back the special case for OP_LOCK, but
in Perl_op_lvalue_flags, not S_doref.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Some bits were missing and others were incompletely renamed back
in 6b356c8efb963846940ef92952cf77e5b86bd65e.
|
| |
| |
| |
| | |
to the top.
|
| |
| |
| |
| |
| | |
Ahem. Once you get things passing, you actually have to commit before
pushing. :-(
|
| |
| |
| |
| |
| |
| | |
Update my own e-mail address
Fix name for <daxim@cpan.org> (not representable in Latin-1)
as seen on <http://search.cpan.org/~daxim/>
|
| |
| |
| |
| |
| | |
This commit rewords the entry in perldiag (again), explaining more
clearly why defined(%hash) is unreliable.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit b8c38f0a2a65 refactored pp_prototype by moving much of its
code to a new function in op.c, called core_prototype. This served
two purposes: (1) to allow the code to be simplified, which required
the use of static functions in op.c, and (2) to allow the &CORE::subs
feature to share the same code.
But some code was moved to core_prototype which, in hindsight, did not
need to be moved, such as the ‘Can’t find an opnumber’ message.
This commit moves that code back to pp_prototype, resulting in a sim-
pler (and possibly faster, at least for &CORE::subs) core_prototype.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This refactoring requires the caller to provide the keyword
number to core_prototype. Consequently, it speeds up the code in
gv.c:gv_fetchpvn_flags by allowing it to avoid an extra call to
keyword().
This takes the place of the len parameter, which is no longer used.
It used to be used only as an argument to keyword(). Since the code
that uses strEQ is only reached if the keyword has already been veri-
fied by keyword(), the name simply cannot have embedded nulls, so len
is not necessary.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit allows this to work:
BEGIN { *entangle = \&CORE::tie };
entangle $foo, $package;
And the entangle call gets inlined as a tie op, the resulting op tree
being indistinguishable.
These subs are not yet callable via &foo syntax or through a refer-
ence. That will come later, except for some functions, like sort(),
which will probably never support it.
Almost all overridable functions are supported. These few are not:
- infix operators
- not and getprotobynumber (can’t get the precedence right yet;
prototype problem)
- dump
Subsequent commits (hopefully!) will deal with those.
How this works:
gv_fetchpvn_flags is extended with hooks to create subs inside the
CORE package. Those subs are XSUBs (whose C function dies with an
error, for now at least) with a call checker that blows away the
entersub op and replaces it with whatever op the sub represents.
This is slightly inefficient right now, as gv_fetchpvn_flags calls
keyword(), only to have core_prototype call it again. That will
be fixed in a future refactoring.
|
| |
| |
| |
| |
| |
| |
| | |
Since it has to calculate it, it might as well provide it, so callers
do not have to go through that while(i < MAXO) loop yet again.
(The &CORE::foo feature will use this.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
And not ::CORE or main::CORE or *CORE, etc.
Since the CORE package’s magic for autovivifying CORE subs
will be based on the package name, we can’t have code like
&::CORE::foo breaking the entire package.
Making a more general change to gv_fetchpvn_flags causes
problems for autoloaded SUPER methods and strangely-named
packages like main::::foo, so this patch is CORE-specific.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
select has a prototype of (;*), which is incorrect, as it implied that
it has high precedence. It also fails to account for the four-argu-
ment form. While removing all incorrect prototypes is counterproduc-
tive, I think this one is wrong enough it deserves to go. (And the
precedence problem is a good argument against it, as there is cur-
rently no other way to set precedence.)
|
| | |
|
| |
| |
| |
| |
| |
| | |
perlcompile.pod is now maintained with B::C, and much more complete there.
[Subsequent build and test fixes by the committer]
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current design of this test is to scan *every* file in a dirty
build directory to see if it contains POD, excluding only a short
list of files and file types that it knows about. This means that
on most platforms it was scanning executable code, object code,
object libraries, dynamic libraries, and many other build products
too numerous to mention.
The present commit expands the exclusion list considerably and
makes that list slightly more cross-platform, but it's probably
still quite incomplete. Whether that list is even worth
maintaining or the test should be based on an inclusion list
rather than an exclusion list is a question worth asking.
On my system, the present austerity measures, despite the addition
of Config, reduce memory consumption by 14% (but it's still a pig,
gulping something like 160MB). Physical I/O is reduced by 105%
and elapsed time by 25%.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
readdir() and thus File::Find return files having zero-length
extensions as 'foo.' which doesn't match entries like 'foo' in
the known problems database. Trimming that trailing dot reduces
the number of failures on VMS to a handful. They are primarily
due to:
1.) The test attempts to exclude .PL files, but on VMS, case is
not preserved by default, so these appear as .pl and are not
excluded, confusing a number of the tests.
2.) Utilities and scripts are built with a .com extension on VMS,
but the corresponding entries in the known problems database have
no extension, so they don't match.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This takes the place of documenting __FILE__() syntax. By adding
these to perlfunc, they are covered by the description of the syntax
at the top of perlfunc. Hopefully this will appease those who think
we should not be teaching it to new bees.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This commit makes the __FILE__, __LINE__ and __PACKAGE__ token parse
the same way as nullary functions.
It adds two extra rules to perly.y to allow the op to be created in
toke.c, instead of directly inside the parser.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a follow-up to e4ac890e26c, which changed behavior from
appending to an existing MANIFEST to creating a new one. On VMS,
that would give us multiple versions, which probably wouldn't
matter except that the tests insist that there is one and only
one copy of every file they've created and they only clean up the
highest version.
The easiest way to handle this is to make sure we clean up first
before creating a new MANIFEST file.
|
| |
| |
| |
| |
| |
| | |
This reverts commit db147d7ee1c1aca547b1d63ef7141e56821a3ae2.
This is no longer necessary, as of this commit’s grandparent.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the argument is optional, we need a semicolon.
This commit accomplishes that by setting the OA_OPTIONAL flag for the
appropriate entries in PL_opargs. This should not affect anything
else, as ck_ftst (the check routine for [l]stat) doesn’t even look at
PL_opargs.
It also has to tweak the prototype-generation logic slightly, because
PL_opargs also has OA_DEFGV set.
I think this is insignificant enough not to warrant a delta entry.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turns out this problem is more knotty than I initially realised.
stat had a prototype of (*), even though it could be called with no
arguments. Since the (*) prototype does not parse its argument the
same way that stat parses *its* argument, I thought that changing (*)
to (;*) would be no better, since it’s still not correct. So I simply
set the prototype to undef.
My thinking was faulty, for two reasons:
• The prototype serves to indicate the precedence, not just the types
of arguments. An undefined prototype on an overridable prefix func-
tion implies that it takes a list. So this causes problems for the
imminent &CORE::subs feature, as there is not yet a clean mechanism
for CVs to parse their arguments.
• The (*) prototype character does not parse the same way as *any*
built-in function with that character in its prototype. So stat is
no worse than any other built-in. It doesn’t make sense to remove
the prototype from stat without removing it from about 40 other
built-in functions; and that’s where pedantry conflicts with
usefulness.
This commit restores the (*) prototype to stat and lstat. The next
commit will give it a (;*) prototype, as that matches it more closely.
It’s not perfect, but it’s no worse that other built-ins with a * in
their prototypes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up to adf2bd2837. This is being used for compile-time
comparisons; sizeof may be compile-time, but is apparently not
available before macro substitution, leading to problems like:
....^
%CC-I-IGNOREEXTRA, Spurious token(s) ignored on preprocessor directive line.
at line number 2837 in file MDA0:[SMOKE.blead]pp_sys.c;1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[perl #95998]
The bareword checking is moved from the peephole optimizer to finalize_optree.
newRANGE needs additional bareword checking because the constants may
be optimized away by 'gen_constant_list'.
The OPpCONST_STRICT flag is removed after giving an error about a
bareword to prevent giving multiple errors about the same bareword.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Aborting after errors found by finalize_optree in do_eval wasn't done
properly and would cause memory problems.
This patch moves the context propagation and finalize_optree to
newPROG such that the normal error handling is done.
The eval context blk_gimme is used to communicate the context.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a few additional macros to XSUB.h:
XS_INTERNAL and XS_EXTERNAL are versions of the XS macro
that explicitly use internal (static) linking or not.
XSPROTO_INTERNAL and XSPROTO_EXTERNAL are the obvious equivalents
for XSPROTO (which is apparently not public yet we support its
use in SWIG...).
The XS and XSPROTO macros themselves are not defined to not
use STATIC, but this may (should?) be changed in the future.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an XS paragraph/function definition that has a CODE section using
RETVAL, then we need an OUTPUT section or else things will go sour.
This adds a check for that condition and produces a friendly error
message.
See CPAN RT #69536.
|
| |
| |
| |
| |
| |
| |
| | |
For the default (non-multiplicity) configuration, PERLVAR*() macros now
directly expand their arguments to tokens such as C<PL_defgv>, instead of
expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>,
which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
|