summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* boot_Win32CORE needs to be XS_EXTERNAL() following commit ab1478f7146843f7.Nicholas Clark2011-08-211-1/+1
| | | | | Win32CORE.c is shipped as a C file, not built by ExtUtils::ParseXS, so needs to be manually updated to reflect the change of default in XSUB.h
* Exlicitly enable exporting of some XSUB symbolsSteffen Mueller2011-08-214-4/+8
| | | | | | These are used in other compilation units. The declarations there use the XS_EXTERNAL macro to indicate an non-static XSUB that is taken from another object file.
* Add OPpASSIGN_CV_TO_GV to B::ConciseFather Chrysostomos2011-08-191-0/+1
|
* Add OPpDONT_INIT_GV to B::ConciseFather Chrysostomos2011-08-191-0/+1
|
* &CORE::wantarray()Father Chrysostomos2011-08-181-0/+1
| | | | | | | | This commit allows &CORE::wantarray to be called via ampersand syntax or through references. It adds a new private flag for wantarray, OPpOFFBYONE, which caller will use as well, telling wantarray (or caller) to look one call fur- ther up the call stack.
* Add coreargs opFather Chrysostomos2011-08-181-2/+2
| | | | &CORE::foo subs will use this operator for sorting out @_.
* [perl #96126] Allocate CvFILE more simplyFather Chrysostomos2011-08-171-17/+25
| | | | | | | | | | | | | | | | | | | See the thread starting at: http://www.nntp.perl.org/group/perl.perl5.porters/2011/07/msg175161.html Instead of assuming that only Perl subs have mallocked CvFILEs and only under threads, resulting in various hackery to borrow parts of the SvPVX buffer where that assumption proves wrong, we can simply add another flag (DYNFILE) to indicate whether CvFILE is mallocked, instead of trying to use the ISXSUB flag for two purposes. This simplifies the code greatly, eliminating bug #96126 in the pro- cess (which had to do with sv_dup not knowing about the hackery that this commit removes). I removed that comment from cv_ckproto_len about CONSTSUBs doubling up the buffer field, as it is no longer relevant. But I still left the code as it is, since it’s better to do an explicit length check.
* Remove OPpENTERSUB_NOMOD from B::ConciseFather Chrysostomos2011-08-151-2/+2
|
* B::Terse and B::Xref were missing some documentation.Reini Urban2011-08-142-3/+61
|
* Simplify embedvar.h, removing a level of macro indirection for PL_* variables.Nicholas Clark2011-08-112-17/+17
| | | | | | | 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.
* Support gcc-4.x on HP-UX PA-RISC/64H.Merijn Brand2011-08-041-4/+10
| | | | | | | | | | | | | | | | | | | Correct the socketsize. Probably due to big-endian versus little-endian, this has always worked on Intel CPUs. This is a very very old problem, and it has been the reason I never used gcc-4 on PA-RISC, because perl would not pass the test suite in 64bitall. Noticeable effects of wrong "$socksizetype" are return codes of 0 (pass) from functions like getpeername (), but invalid (or none) data in the returned structures or a return length of 0 or 256. In the latter case, the length is stored in the second part of the 64bit long and the 32bit first part is 0. This might be true on Intel-like machines too, but the tests will pass, as the significant part of the returned length is in the first 32bits and a pointer to int will still see that correct. Mind that in that case the 32bits after that might have been overridden => can of worms.
* Increase $IPC::Open::VERSION to 1.12Father Chrysostomos2011-07-271-1/+1
|
* [perl #95748] IPC::Open3::open3(..., '-') brokenSalvador Fandino2011-07-271-2/+5
| | | | | | | | IPC::Open3::open3($in, $out, $err, '-') is broken in 5.14.1 Because the old "return 0" used to return to user code now is wrapped inside and eval block. This patch solves the problem.
* Increase $PerlIO::via::VERSION following commit d477ab3eb4369a52.Nicholas Clark2011-07-211-1/+1
|
* s/bellow/below/ in PerlIO::via docsEric Brine2011-07-211-2/+2
| | | | Signed-off-by: Abigail <abigail@abigail.be>
* Perl_rpeep: undo tail recursion optimisationDavid Mitchell2011-07-181-2/+4
| | | | | | | | | | | | | | | | commit 3c78429c102e0fe2ad30c60dfe52636b6071ef19 reduced the depth of recursion in rpeep(), by deferring recursion into branches until a bit later (so that the recursive call to rpeep was then likely to be shallow). However, it went one step further: when the chain of op_next's had been exhausted in the main loop, it processed any remaining deferrred branches in the main loop rather than recursing. All nice and efficient, but it broke the expectation that someone who had hooked into rpeep could follow the chain of op_nexts in each call and visit *all* ops. This commit removes that optimisation and restores the rpeep hook expectancy. This shouldn't have any major effect on the depth of recursion, and its minor inefficiency doesn't really matter for a one-time compilation-time pass.
* Actually test cop_*_labelReini Urban2011-07-171-0/+10
|
* Fix a wrong length in APItest.xs:test_coplabelFather Chrysostomos2011-07-171-1/+1
|
* Bring cop label testing in line with intentions.Craig A. Berry2011-07-171-12/+13
| | | | | | | | | | | | | | | | | 8375c93eec supplied tests for a newly exported API but the type declarations for the arguments and return values didn't match the types of the API being tested. aebc0cbee0 renamed the functions without updating the calls to those functions in the test. Either of these could have been easily spotted by building with g++ (or other readily available tools) before pushing. This aside from the controversy over whether this particular API is the one that should be publicly exported, so this all may be reverted and replaced before 5.16.0, but hopefully it will unbreak the build for now.
* Export store_cop_label for the perl compilerReini Urban2011-07-161-0/+21
|
* make peep optimiser recurse mostly only shallowlyDavid Mitchell2011-07-141-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long blocks of code that include logical or loop ops (i.e. those with multiple 'branches' of ops, such as op_other, op_redo etc) cause Perl_rpeep to recurse deeply and eventaully SEGV. For example this crashes, due to the ENTERLOOP: eval ("{\$x = 1 }\n" x 10000) The deep recursion happens because the processing of the entire rest of the code occurs in within the nested call. For example in the code A && B; C; D; E; the ops are structured as A -> AND -> C -> D -> E \ / B where AND->op_next points to C, while AND->op_other points to B. rpeep() would normally process each op in the op_next sequence in turn (i.e. A/AND/C/D/E), but when it reaches AND, it recursively calls rpeep(B), which happens to then process B/C/D/E. Finally it returns, and the parent rpeep processes C, finds it's already done, and exits. Clearly, if C,D,E etc also contain conditional/loop ops, then the recursion level gradually stacks up. The fix for this is to add a small deferred queue to rpeep(). Whenever rpeep wants to recurse with op_other or op_lastop etc, it instead adds it to the deferred queue. Only if the queue is full is rpeep actually called. The hope is that by deferring, when we do eventually process it, enough of the main op_next chain has already been processed to ensure that the child rpeep returns very early. In the example above, processing of AND causes B to be added to the queue, and the main rpeep process continues processing C, D etc. Sometime later, the queue becomes full and B is processed via a recursive call to rpeep. B is processed, and op_next is followed to C, but C is marked as already processed, so the child rpeep returns almost immediately. For LOOP ops, I've stopped following op_redoop and op_nextop, since AFAIKT the ops these point to will also be reachable vie op_next anyway. op_lastop is the exception; in while(1){..} only op_lastop points to the rest of the code block. Note that this commit doesn't guarantee only shallow recursion, it just makes deep recursion fairly unlikely. Note also that this commit causes the order of the processing of op_next chains to be altered; this can affect the ordering of compiler warnings and fatal messages among potentially other things.
* Tests for the pad cleanup.Brian Fraser2011-07-122-4/+25
|
* pad.c: flags checking for the UTF8 flag when necessaryBrian Fraser2011-07-121-0/+321
|
* API tests for pad_findmy_*()Zefram2011-07-122-0/+140
|
* API test for find_rundefsv()Zefram2011-07-122-0/+34
|
* APIify pad functionsZefram2011-07-121-5/+1
| | | | | | | Move several pad functions into the core API. Document the pad functions more consistently for perlapi. Fix the interface issues around delimitation of lexical variable names, providing _pvn, _pvs, _pv, and _sv forms of pad_add_name and pad_findmy.
* Merge branch 'smueller/eu_typemap' into bleadSteffen Mueller2011-07-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much of ExtUtils::ParseXS was rewritten and cleaned up. It has been made somewhat more extensible and now finally uses strictures. The logic for parsing, merging, and dumping XS typemaps was extracted from ExtUtils::ParseXS into a module of its own, ExtUtils::Typemaps. ExtUtils::Typemaps offers an interface to typemap handling outside of the scope of the XS compiler itself. As a first use case of the improved API an extensibility, typemaps can now be included inline into XS code with a HEREDOC-like syntax: TYPEMAP: <<END_TYPEMAP MyType T_IV END_TYPEMAP
| * Revert "Revert "Moved prototype check to XS code, allowing the .pm file ↵Steffen Mueller2011-07-122-6/+3
| | | | | | | | | | | | | | change from yesterday"" This reverts commit cf8fc7eed929846d31d02d565b4d5f4480a18d69, reinstating the move of the prototype check to XS code.
| * Revert "Moved prototype check to XS code, allowing the .pm file change from ↵Steffen Mueller2011-07-122-3/+6
| | | | | | | | | | | | | | | | yesterday" This reverts commit d16d4b10300b35e2d4d858a3e23cff975bc713fe. It requires the _ prototype support in ExtUtils::ParseXS and we need to temporarily disable that. Will be reapplied later.
* | Make SvIsCOW honest about globsFather Chrysostomos2011-07-122-0/+20
|/ | | | | | | | SvIsCOW was ignoring the fact that it might be passed a typeglob, which made its behaviour contradict its docs. This fixes that and, in doing so, simplifies the upcoming Internals::SvREADONLY fix.
* Add tests for wrapping formats in B objectsFlorian Ragwitz2011-07-111-0/+9
|
* The test for #76474 should open file descriptor 0, not 1.Nicholas Clark2011-07-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original bug report states if we try to dup STDIN in a child process by using it's file descriptor but has code to dup 1, not 0: perl -MIPC::Open3 -wle 'open3("<&1", my $out, undef, $^X)' Change the above code to "<&0" and the same bug is demonstrated, and fixed by the relevant change. However, trying to open descriptor 1 for input causes subtle portability problems, which conceal the actual bug we're attempting to test. On most platforms the terminal is read write, and a command tested on the command line actually has file descriptor 1 read/write (and probably file descriptor 0 also) When the output is being piped, for example in a test checking the output, descriptor 1 is (likely to be) write only. PerlIO is quite happy to *open* a such a numeric file descriptor for reading, and will only generate an error if an actual read is attempted (which this test does not). stdio (on several platforms tested) fails the *open* in the same scenario. Hence whether this *test* passed or failed depended on the IO system used, which is actually not what we want to test. Original test added in a0ed8b7b5f7f6d6f, fix added in fb9b5b31d8a62644.
* Increase $XS::APItest::VERSIONFather Chrysostomos2011-07-041-1/+1
|
* Add a test for perl_clone with CLONEf_COPY_STACKS to XS-APItest.Gerard Goossen2011-07-042-0/+108
| | | | | CLONEf_COPY_STACKS is only used by the windows pseudo-fork. This test allows testing/debugging of CLONEf_COPY_STACK without needing threads or Windows.
* For shorter strings, store C<study>'s data as U8s or U16s, instead of U32s.Nicholas Clark2011-07-011-4/+53
| | | | | | | The assumption is that most studied strings are fairly short, hence the pain of the extra code is worth it, given the memory savings. 80 character string, 336 bytes as U8, down from 1344 as U32 800 character string, 2112 bytes as U16, down from 4224 as U32
* Store C<study>'s data in in mg_ptr instead of interpreter variables.Nicholas Clark2011-07-011-12/+24
| | | | | This allows more than one C<study> to be active at the same time. It eliminates PL_screamfirst, PL_lastscream, PL_maxscream.
* Split out study magic from pos magic.Nicholas Clark2011-07-011-4/+4
| | | | | | study uses magic to call SvSCREAM_off() if the scalar is modified. Allocate it its own magic type ('G' for now - pos magic is 'g'). Share the same "set" routine and vtable as regexp/bm/fm (setregxp and vtbl_regexp).
* attributes.pm: warn & don’t apply :lvalue to defined subsFather Chrysostomos2011-06-222-0/+13
| | | | | | | | This is something that ‘sub foo :lvalue;’ declarations do. This brings attributes.pm in line with them. See commits fff96ff and 885ef6f, ticket #68758, and <364E1F98-FDCC-49A7-BADB-BD844626B8AE@cpan.org>.
* Increase $attributes::version to 0.15Father Chrysostomos2011-06-221-1/+1
| | | | I’m about to make changes to it.
* Merge ext/IPC-Open2 into ext/IPC-Open3.Nicholas Clark2011-06-162-0/+0
| | | | | IPC::Open2::open2() is implemented as a thin wrapper around IPC::Open3::_open3(), and hence is very tightly coupled to it.
* Add PERL_NO_GET_CONTEXT to ODBM_FileNicholas Clark2011-06-162-1/+3
| | | | | For threaded platforms, this reduces the object code size, and should slightly reduce CPU usage.
* Move an XS::APItest var decl to PREINITFather Chrysostomos2011-06-121-1/+2
| | | | Hopefully this will get smoke reports to pass again on Windows.
* Completely free hashes containing nullsFather Chrysostomos2011-06-122-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced since 5.14.0, by commit e0171a1a3. The new Perl_hfree_next_entry function that that commit introduced returns the value of the hash element, or NULL if there are none left. If the value of the hash element is NULL, the two cases are indistin- guishable. Before e0171a1a3, all the hash code took null values into account. mro_package_moved took advantage of that, stealing values out of a hash and leaving it to the freeing code to delete the elements. The two places that call Perl_hfree_next_entry (there was only one, S_hfreeentries, with commit e0171a1a3, but the following commit, 104d7b699c, made sv_clear call it, too) were not accounting for NULL values’ being returned, and could terminate early, resulting in mem- ory leaks. One could argue that the perl core should not be assigning nulls to HeVAL, but HeVAL is part of the public API and there could be CPAN code assigning NULL to it, too. So the safest approach seems to be to modify Perl_hfree_next_entry’s callers to check the number of keys and not to attribute a signifi- cance to a returned NULL.
* Fix two broken URLs in mro.pm, bump version and document in perldeltaLeon Brocard2011-06-122-11/+4
|
* Reorder ops so that trans{,r} and aelemfast{,_lex} are adjacent.Nicholas Clark2011-06-121-1/+1
|
* Split OP_AELEMFAST_LEX out from OP_AELEMFAST.Nicholas Clark2011-06-123-5/+9
| | | | | | | | | | | | | 6a077020aea1c5f0 extended the OP_AELEMFAST optimisation to lexical arrays. Previously OP_AELEMFAST was only used as an optimisation for OP_GV, which is a PADOP/SVOP. However, by reusing the same opcode, and signalling (pad) lexical vs package, it introduced a myriad of special cases, because OP_PADAV is a BASEOP (not a PADOP), whilst OP_AELEMFAST is a PADOP/SVOP (which is larger). Using two OP numbers allows each variant to have the correct OP flags in PL_opargs. Both can continue to share the same C code.
* Remove TODO markers from Devel::Peek testsFather Chrysostomos2011-06-111-5/+18
| | | | These all pass now as of commit b56985536ef7.
* Replace references to PL_vtbl_{bm,fm} in the code with PL_vtbl_regexp.Nicholas Clark2011-06-111-2/+2
| | | | | Also, in Perl_sv_magic() merge the case for PERL_MAGIC_dbfile with the others that return a NULL vtable.
* Tests for Perl_get_vtbl()Nicholas Clark2011-06-112-0/+49
|
* Store FBMs in PVMGs, instead of GVs.Nicholas Clark2011-06-112-4/+4
| | | | | | | | 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).