summaryrefslogtreecommitdiff
path: root/ext/Devel-Peek
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* 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.
* Store FBMs in PVMGs, instead of GVs.Nicholas Clark2011-06-111-2/+2
| | | | | | | | 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).
* Store the BM table in mg_ptr instead of after SvCUR().Nicholas Clark2011-06-111-0/+4
| | | | | | | | | | | | 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().
* Use SvTAIL() instead of BmFLAGS(). The core no longer uses BmFLAGS().Nicholas Clark2011-06-111-2/+0
|
* Don't fbm_compile() studied scalars, to give more flexibility in SV flag usage.Nicholas Clark2011-06-111-2/+18
| | | | | 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.
* Don't allow study on an FBM scalar, to give more flexibility in SV flag usage.Nicholas Clark2011-06-111-2/+24
| | | | | No real-world code would ever end up studying an FBM scalar, so this isn't a real pessimisation.
* Test dumping studied scalars.Nicholas Clark2011-06-111-1/+29
|
* Perl_do_sv_dump() shouldn't show "IV" for a FBM, as it's not valid.Nicholas Clark2011-06-111-0/+38
| | | | | | | 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.
* Make Devel::Peek::fill_mstats work on COWsFather Chrysostomos2011-06-042-0/+9
|
* ext/Devel-Peek/Peek.pm: Fix broken linksKarl Williamson2011-05-181-2/+2
|
* Fix broken linkKarl Williamson2011-05-181-2/+3
|
* Perl_do_sv_dump: dump REGEXP bodyDavid Mitchell2011-01-301-1/+22
| | | | | Now that a regexp is a first-class SV, dump all the fields of the 'struct regexp': it's just another SV body type
* Version bumps for Devel-Peek non-dual-life modules identified byJesse Vincent2011-01-201-1/+1
| | | | ./perl -Ilib Porting/cmpVERSION.pl -xd . v5.13.8
* Fix typos (spelling errors) in ext/*.Peter J. Acklam) (via RT2011-01-072-4/+4
| | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #81882] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81882 > Signed-off-by: Abigail <abigail@abigail.be>
* Devel-Peek/Peek.pm: update example outputs in podDavid Mitchell2011-01-051-103/+100
| | | | | | | | | | Quite a lot has changed since those examples were written: the RV body type no longer exists, the indentation is different, the address of the SV as well as its body is now displayed, and various fields are no longer displayed by default. Also, as per https://rt.cpan.org/Public/Bug/Display.html?id=56286, the 2-element array example had the wrong FILL/MAX.
* bump version of many modulesZefram2010-12-191-1/+1
| | | | | Core-only modules that have changed from v5.13.7, and dual-life modules that have changed from v5.13.7 and didn't show up in earlier passes.
* fix various compiler warnings from XS codeZefram2010-12-111-0/+7
| | | | | | | | | | | Trivial changes to fix warnings of types * unclear precedence * assignment as conditional * signed/unsigned mixing * unused parameter/variable * value computed not used * wrong argument type for a printf format * variable may be used uninitialised (due to unhandled switch case)
* Test dumping stashes, with various combinations of NAME and ENAME.Nicholas Clark2010-11-251-0/+68
|
* Refactor Peek.t to give more useable diagnostics.Nicholas Clark2010-11-251-39/+36
| | | | | | Change the numeric test IDs to meaningful names. Provide the names as test descriptions. Describe the purpose of the second test. Only output the line numbers if the tests fail. Swap from an explicit plan to done_testing().
* Convert modules in ext/ to pass minimal arguments to XSLoader::load().Nicholas Clark2010-10-141-3/+3
|
* Remove MEMBER_TO_FPTR.Ben Morrow2010-10-061-3/+2
| | | | This is left over from PERL_OBJECT (see beeff2, 16c915, and so on).
* Add (?^...) regex constructKarl Williamson2010-09-201-3/+3
| | | | | | | | | | | | | | | | | | This adds (?^...) to signify to use the default regex modifiers for the cluster or embedded pattern-match modifier change. The major purpose of this is to simplify regex stringification, so that "^" is output in place of "-xism". As a result, the stringification will not change in the future when new regex modifiers are added, so tests, etc. that rely on a particular stringification will have to change now, but never again. Code that needs to work properly with both old- and new-style regexes can use something like the following: # Accept both old and new-style stringification my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; This construct is Ben Morrow's idea.
* prevent Devel::Peek::Dump from lieing to us about evil class namesYves Orton2010-08-251-1/+23
| | | | | While one certainly can argue the merits of using a class name like "\0", it is legal so lets avoid it confusing our primary debugging tool.
* Peek.t: better identify failing testsDavid Mitchell2010-07-291-1/+3
|
* Dump didn't display CVf_ISXSUB flagDavid Mitchell2010-07-291-1/+1
|
* add CVf_CVGV_RC flagDavid Mitchell2010-07-181-2/+2
| | | | | | | | | | | | | after the recent commit 803f274831f937654d48f8cf0468521cbf8f5dff, the CvGV field is sometimes reference counted. Since it was intended that the reference counting would happen only for anonymous CVs, the CVf_ANON flag was co-opted to indicate whether RC was being used. This is not entirely robust; for example, sub __ANON__ {} is a non-anon sub which points to the same GV used by anon subs, which while itself doesn't directly break things, shows that the potential for breakage is there. So add a separate flag just to indicate the reference count status of the CvGV field.
* Convert Devel::Peek's test to Test::More.Nicholas Clark2010-06-301-4/+2
| | | | The flag change from 0x0 to 0x4 is because Test::More sets autoflush on STDOUT.
* Reorder CVf_* flags to be numerically contiguous again.Nicholas Clark2010-06-091-2/+5
| | | | | The removal of CVf_ASSERTION in 584420f022db5722 and CVf_LOCKED in e95ab0c0d2aa1b35 left two gaps in the sequence of bits in use.
* SvIVX() isn't valid on SVt_REGEXPNicholas Clark2010-05-201-1/+0
|
* Fix for non-regexps being upgraded to SVt_REGEXPNicholas Clark2010-02-091-1/+1
| | | | | | | | | | | | | | $ ./perl -lwe '$a = ${qr//}; $a = 2; print re::is_regexp(\$a)' 1 It is possible for arbitrary SVs (eg PAD entries) to be upgraded to SVt_REGEXP. (This is new with first class regexps) Whilst the example above does not SEGV, it will be possible to write code that will cause SEGVs (or worse) at the point when the scalar is freed, because the code in sv_clear() assumes that all scalars of type SVt_REGEXP *are* regexps, and passes them to pregfree2(), which assumes that pointers within are valid.
* Improvements to 31c9a3 - CPAN code did depend on the previous behaviour of ↵Nicholas Clark2010-02-061-1/+1
| | | | | | | | | | | | | | | | | | | blessing filehandles into FileHandle It turns out that it's not quite as simple as blessing into IO::File. If you do (just) that, then it breaks any existing code that does C<require IO::Handle;> to allow it to call methods on file handles, because they're blessed into IO::File, which isn't loaded. (Note this code doesn't assume that methods in IO::Seekable are there to be called) So, it all should work if you also set @IO::File:::ISA correctly? That way, code that assumes that methods from IO::Handle can be called will work. However, gv.c now starts complaining (but not failing) if IO::Handle, IO::Seekable and Exporter aren't present, because it goes looking for methods in them. So the solution seems to be to set @IO::File::ISA *and* create (empty) stashes for the other 3 packages. Patch appended, but not applied.
* Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.Nicholas Clark2009-12-021-3/+3
| | | | | | | | | | | | | | | | Instead of returning a(nother) reference to the (pre-compiled) regexp in the optree, use reg_temp_copy() to create a copy of it, and return a reference to that. This resolves issues about Regexp::DESTROY not being called in a timely fashion (the original bug tracked by RT #69852), as well as bugs related to blessing regexps, and of assigning to regexps, as described in correspondence added to the ticket. It transpires that we also need to undo the SvPVX() sharing when ithreads cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned copy of the mother_re. This change might fix bugs with regexps and threads in certain other situations, but as yet neither tests nor bug reports have indicated any problems, so it might not actually be an edge case that it's possible to reach.
* PVIOs don't use the SvIVX slot.Nicholas Clark2009-11-191-1/+1
|
* Make extensions in ext run their tests from the extension's own directory.Nicholas Clark2009-08-281-3/+1
| | | | | | | | | | | Inspired by, and in parts borrows from, Schwern's branch on github, but takes a slightly different approach in places. Not quite perfect yet - ext/File-Glob still runs from t, at least one FIXME needs fixing, and the changes to dual-life modules' tests need to be filtered back upstream, and possibly modified to suit their respective authors. But it works.
* Remove now-redundant references to MAN3PODS in core modules' Makefile.PLs.Nicholas Clark2009-03-261-1/+0
|
* Rename ext/Devel/Peek to ext/Devel-PeekNicholas Clark2009-02-095-0/+1735