summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove OPpENTERSUB_NOMOD from B::ConciseFather Chrysostomos2011-08-151-2/+2
|
* Remove OPpENTERSUB_NOMOD.Gerard Goossen2011-08-153-7/+0
| | | | | | 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.
* Propagate lvalue context only to children of list ops which are not in void ↵Gerard Goossen2011-08-152-2/+14
| | | | | | | | | | | 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.
* Fix tabbing and trailing whitespace from commit f1d35e3443Steve Hay2011-08-151-16/+16
| | | | and bump IO::Socket version.
* Use the exception set in select (connect()) to early return when remote end ↵Karthik Rajagopalan2011-08-151-4/+15
| | | | | | | | | | 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.
* generic perldelta entry for prototype changesFather Chrysostomos2011-08-151-2/+3
|
* &CORE::not and &CORE::getprotobynumberFather Chrysostomos2011-08-154-10/+7
| | | | | | 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.
* Give not and getprotobynumber listop prototypesFather Chrysostomos2011-08-152-2/+3
| | | | | They parse as list operators, but their prototypes imply unop precedence.
* Document and test $; prototype syntaxFather Chrysostomos2011-08-152-2/+17
| | | | | This has worked this way for yonks. It is actually useful, so it might as well be documented.
* Move checking of CV to GV assigned (OPpASSIGN_CV_TO_GV) from the peephole ↵Gerard Goossen2011-08-151-45/+41
| | | | optimizer to scalarvoid
* Merge branch 'blead' of ssh://perl5.git.perl.org/perl into bleadJesse Vincent2011-08-15218-5865/+5889
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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. ...
| * CORE.pod: fix nit grammarKarl Williamson2011-08-151-1/+1
| |
| * podcheck.t pod grammar fixKarl Williamson2011-08-151-1/+1
| |
| * Make lock(&foo) syntax nominally lock the subroutineFather Chrysostomos2011-08-156-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Forgot one in d677d0fca41325ba7203de00652fdeb43659754a.Craig A. Berry2011-08-141-0/+1
| |
| * Write some missing version strings in configure.comCraig A. Berry2011-08-141-0/+4
| |
| * Correct some format strings in configure.com.Craig A. Berry2011-08-141-8/+19
| | | | | | | | | | Some bits were missing and others were incompletely renamed back in 6b356c8efb963846940ef92952cf77e5b86bd65e.
| * Improve comments about op_private bits. And move the non op specific flags ↵Gerard Goossen2011-08-141-4/+8
| | | | | | | | to the top.
| * get authors.t passing againFather Chrysostomos2011-08-141-1/+2
| | | | | | | | | | Ahem. Once you get things passing, you actually have to commit before pushing. :-(
| * Update AUTHORS file and convert from Latin-1 to UTF-8Keith Thompson2011-08-141-34/+34
| | | | | | | | | | | | 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/>
| * perldiag.pod on defined %hashKevin Ryde2011-08-141-10/+15
| | | | | | | | | | This commit rewords the entry in perldiag (again), explaining more clearly why defined(%hash) is unreliable.
| * perldelta for &CORE::fooFather Chrysostomos2011-08-141-1/+24
| |
| * Update core_prototype’s docsFather Chrysostomos2011-08-141-4/+2
| |
| * Move pp_-specific code out of core_prototypeFather Chrysostomos2011-08-146-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Change core_prototype to take a keyword numFather Chrysostomos2011-08-145-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Add tests for precedence of CORE:: subsFather Chrysostomos2011-08-141-4/+21
| |
| * Add inlinable &CORE::functionsFather Chrysostomos2011-08-149-9/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Make core_prototype provide the op number as wellFather Chrysostomos2011-08-145-15/+22
| | | | | | | | | | | | | | 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.)
| * Make sure the CORE package is always called COREFather Chrysostomos2011-08-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove select’s prototypeFather Chrysostomos2011-08-143-4/+4
| | | | | | | | | | | | | | | | | | 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.)
| * B::Terse and B::Xref were missing some documentation.Reini Urban2011-08-143-4/+63
| |
| * remove the rest of pod/perlcompile.podReini Urban2011-08-146-304/+0
| | | | | | | | | | | | perlcompile.pod is now maintained with B::C, and much more complete there. [Subsequent build and test fixes by the committer]
| * In makedef.pl, use %Config to avoid hardcoding the DLL version number.Nicholas Clark2011-08-132-3/+4
| |
| * Initial attempt at putting podcheck.t on a diet.Craig A. Berry2011-08-131-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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%.
| * Trim trailing dots on VMS in podcheck.t.Craig A. Berry2011-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Check more than just the first word of the "Inconsistent C3" error message.Nicholas Clark2011-08-131-1/+2
| |
| * perldelta for __FILE__()Father Chrysostomos2011-08-121-0/+6
| |
| * Test __FILE__() syntaxFather Chrysostomos2011-08-121-1/+4
| |
| * Add __FILE__ and its minions to perlfuncFather Chrysostomos2011-08-121-1/+17
| | | | | | | | | | | | | | 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.
| * [perl #95546] Allow () after __FILE__, etc.Father Chrysostomos2011-08-125-990/+1037
| | | | | | | | | | | | | | | | 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.
| * Clean up MANIFEST before creating a new one.Craig A. Berry2011-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Revert "Oops! Update B::Deparse for the (l)stat proto change"Father Chrysostomos2011-08-121-2/+2
| | | | | | | | | | | | This reverts commit db147d7ee1c1aca547b1d63ef7141e56821a3ae2. This is no longer necessary, as of this commit’s grandparent.
| * Change (l)stat’s prototype from * to ;*Father Chrysostomos2011-08-124-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Revert "[perl #95550] Remove prototypes from (l)stat"Father Chrysostomos2011-08-123-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Better st_ino_size probe in configure.com.Craig A. Berry2011-08-121-6/+28
| | | | | | | | | | | | | | | | | | | | 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
| * Move bareword checking from the peephole optimizer to finalize_optree. Fixes ↵Gerard Goossen2011-08-115-12/+17
| | | | | | | | | | | | | | | | | | | | [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.
| * Move context propagation and finalize_optree from do_eval to newPROGGerard Goossen2011-08-112-15/+15
| | | | | | | | | | | | | | | | 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.
| * API to explicitly select to export XSUB symbols or notSteffen Mueller2011-08-111-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * ExtUtils::ParseXS: Check that an XSUB with CODE&RETVAL has an OUTPUTSteffen Mueller2011-08-112-2/+24
| | | | | | | | | | | | | | | | | | | | 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.
| * Simplify embedvar.h, removing a level of macro indirection for PL_* variables.Nicholas Clark2011-08-1117-846/+459
| | | | | | | | | | | | | | 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.