7 years agoBump $VERSION to 0.80_50
Nicholas Clark [Wed, 21 Jun 2017 20:18:09 +0000]
Bump $VERSION to 0.80_50

7 years agoThis is 0.80 - update META.yml, and META.json
Nicholas Clark [Mon, 30 Mar 2015 17:06:12 +0000]
This is 0.80 - update META.yml, and META.json

9 years agoBump $VERSION to 0.80
Nicholas Clark [Mon, 30 Mar 2015 17:05:30 +0000]
Bump $VERSION to 0.80

9 years agoThis is 0.79_54 - update META.yml, and META.json
Nicholas Clark [Fri, 27 Mar 2015 19:20:03 +0000]
This is 0.79_54 - update META.yml, and META.json

9 years agoFix the build under 5005 threads.
Nicholas Clark [Fri, 27 Mar 2015 18:46:06 +0000]
Fix the build under 5005 threads.

9 years agoAvoid tests failing because Test::More changes the size of %::
Nicholas Clark [Thu, 26 Mar 2015 20:14:42 +0000]
Avoid tests failing because Test::More changes the size of %::

9 years agoMove the declaration and closing brace of padlist_size() outside of the #ifdefs
Nicholas Clark [Thu, 26 Mar 2015 16:22:17 +0000]
Move the declaration and closing brace of padlist_size() outside of the #ifdefs

The prototype (and return type) needs to be the same, whatever the
implementation is, so DRY by having it 3 times (and missing C<static void> in
one of them - spotted by Slaven's CPAN smoker).

9 years agoBump $VERSION to 0.79_54
Nicholas Clark [Thu, 26 Mar 2015 16:21:10 +0000]
Bump $VERSION to 0.79_54

9 years agoThis is 0.79_53 - update META.yml, and META.json
Nicholas Clark [Thu, 26 Mar 2015 16:19:40 +0000]
This is 0.79_53 - update META.yml, and META.json

9 years agoMore complete handling of padlists for XSUBs.
Zefram [Fri, 20 Mar 2015 17:24:06 +0000]
More complete handling of padlists for XSUBs.

[Code by Zefram, commit message by Nicholas]

Following discussion with Zefram on IRC, I agree that his code is more
correct than mine. Prior to the use of the CvPADLIST slot on an XSUB for
binary incompatibility detection, cv_undef() would unconditionally treat
CvPADLIST() as a pointer to a padlist structure (on both PVCVs and PVFMs),
walking it and calling the relevant free functions. Hence on those versions,
CvPADLIST could not be anything other than a legitimate padlist, else the
interpreter would crash. So we should be consistent and calculate the size
on the same basis.

CPAN #102909

9 years agoAttached patch adds handling of children of METHOP and UNOP_AUX ops,
Zefram [Mon, 23 Mar 2015 09:42:14 +0000]
Attached patch adds handling of children of METHOP and UNOP_AUX ops,

which I missed out from my earlier patches.

9 years agoHandle PADNAMELIST/PADNAME introduced in v5.21.7
Nicholas Clark [Tue, 24 Mar 2015 20:15:06 +0000]
Handle PADNAMELIST/PADNAME introduced in v5.21.7

9 years agoCount the size of padlist names in CVs (for v5.18 and later).
Nicholas Clark [Wed, 25 Mar 2015 19:35:19 +0000]
Count the size of padlist names in CVs (for v5.18 and later).

Fixing this for pre-v5.18 involves solving the more general problem of when
to "recurse" into nested structures, currently bodged with "SOME_RECURSION"
and friends. :-(

9 years agoAvoid t/recurse.t failing on earlier versions on 32 bit platforms.
Nicholas Clark [Tue, 24 Mar 2015 20:05:48 +0000]
Avoid t/recurse.t failing on earlier versions on 32 bit platforms.

Subroutines used to be smaller than its hard-coded assumption.

9 years agoBump $VERSION to 0.79_53
Nicholas Clark [Fri, 20 Mar 2015 21:33:35 +0000]
Bump $VERSION to 0.79_53

9 years agoThis is 0.79_52 - update META.yml, and META.json
Nicholas Clark [Fri, 20 Mar 2015 21:31:19 +0000]
This is 0.79_52 - update META.yml, and META.json

9 years agoA more robust test for the size of subroutines in packages which import.
Nicholas Clark [Fri, 20 Mar 2015 20:23:33 +0000]
A more robust test for the size of subroutines in packages which import.

A test in t/recurse.t broke because Test::More::is() had been refactored.
Obviously that wasn't correct. Ultimately the problem was because the test
as-was wasn't minimally testing the thing that it was intended to test. It
should be now. Comments in the test explain the problem.

Reported as CPAN #102910.

9 years agoAs of v5.21.6, CvPADLIST() is only legal on pure Perl subroutines.
Nicholas Clark [Sun, 1 Mar 2015 16:07:27 +0000]
As of v5.21.6, CvPADLIST() is only legal on pure Perl subroutines.

So move the call to padlist_size into the CvISXSUB() else block.

9 years agohandle the multideref op, and to a limited extent UNOP_AUX in general.
Zefram [Fri, 20 Mar 2015 17:29:33 +0000]
handle the multideref op, and to a limited extent UNOP_AUX in general.

[CPAN #102911]

9 years agoHandle the new METHOP.
Zefram [Fri, 20 Mar 2015 17:21:11 +0000]
Handle the new METHOP.

[CPAN #101071]

9 years agoBump $VERSION to 0.79_52
Nicholas Clark [Sat, 28 Feb 2015 15:54:07 +0000]
Bump $VERSION to 0.79_52

9 years agoThis is 0.79_51 - update META.yml, and META.json
Nicholas Clark [Sat, 28 Feb 2015 15:53:12 +0000]
This is 0.79_51 - update META.yml, and META.json

9 years agoUse formline for creating an OOK scalar to test.
Nicholas Clark [Sat, 28 Feb 2015 15:24:13 +0000]
Use formline for creating an OOK scalar to test.

As of 5.20.0, s/// no longer reliably triggers OOK, as COW is enabled.
Thanks to Niko Tyni for diagnosing the cause of the test failure.

CPAN #95493

9 years agoBump $VERSION to 0.79_51
Nicholas Clark [Sat, 28 Feb 2015 14:35:52 +0000]
Bump $VERSION to 0.79_51

9 years agoThis is 0.79_50 - update META.yml, and META.json
Nicholas Clark [Sat, 28 Feb 2015 14:33:27 +0000]
This is 0.79_50 - update META.yml, and META.json

9 years agoUpdate CHANGES.
Nicholas Clark [Sat, 28 Feb 2015 14:00:04 +0000]
Update CHANGES.

9 years agoreading tied scalar shrinks it
Zefram [Tue, 27 Aug 2013 15:19:34 +0000]
reading tied scalar shrinks it

One of Devel-Size's tests, for a tied scalar visibly growing when the
underlying tie object grows, is failing on Perl 5.19.3 because an earlier
read of the scalar clears its PV buffer, causing the scalar to shrink.
Attached patch makes the test allow for such shrinkage.

9 years agowrong test for magicalness
Zefram [Tue, 27 Aug 2013 14:57:35 +0000]
wrong test for magicalness

Devel::Size looks at the SvMAGIC pointer for any SV that's SVt_PVMG or above.
This is incorrect.  It is actually necessary (and sufficient) to check the
SvMAGICAL flag.  Attached patch fixes.

9 years agoBump $VERSION to 0.79_50
Nicholas Clark [Sat, 28 Feb 2015 13:45:13 +0000]
Bump $VERSION to 0.79_50

9 years agoThis is 0.79 - update META.yml, and META.json
Nicholas Clark [Sun, 12 May 2013 13:55:32 +0000]
This is 0.79 - update META.yml, and META.json

11 years agoBump $VERSION to 0.79
Nicholas Clark [Sun, 12 May 2013 13:53:32 +0000]
Bump $VERSION to 0.79

11 years agoThis is 0.78_52 - update META.yml, and META.json
Nicholas Clark [Fri, 10 May 2013 12:44:20 +0000]
This is 0.78_52 - update META.yml, and META.json

11 years agoCorrect the error in the fix for cop_stashpv on v5.17.1 and later.
Nicholas Clark [Fri, 10 May 2013 12:38:19 +0000]
Correct the error in the fix for cop_stashpv on v5.17.1 and later.

Remember to go back and test on the various blead versions *after* making the
fix for the problems found on the various stable versions.

11 years agoBump $VERSION to 0.78_52
Nicholas Clark [Fri, 10 May 2013 12:37:52 +0000]
Bump $VERSION to 0.78_52

11 years agoThis is 0.78_51 - update META.yml, and add META.json
Nicholas Clark [Fri, 10 May 2013 12:19:09 +0000]
This is 0.78_51 - update META.yml, and add META.json

11 years agoAs of v5.17.1, cop_stashpv no longer exists on threaded perls.
Nicholas Clark [Fri, 10 May 2013 12:06:56 +0000]
As of v5.17.1, cop_stashpv no longer exists on threaded perls.

Instead, the cop's stash is indirected via cop_stashoff and PL_stashpad.
(See blead commit d4d03940c58a0177)

11 years agoThe cop_stash pointer isn't reference counted, so don't add its size.
Nicholas Clark [Fri, 10 May 2013 11:54:15 +0000]
The cop_stash pointer isn't reference counted, so don't add its size.

See rt.perl.org #117941 for the obscure problems that this lack of reference
counting can cause.

11 years agoCorrect the year for the 0.78 release in the CHANGES file.
Nicholas Clark [Fri, 10 May 2013 11:48:57 +0000]
Correct the year for the 0.78 release in the CHANGES file.

11 years agoBump $VERSION to 0.78_51
Nicholas Clark [Fri, 10 May 2013 10:41:57 +0000]
Bump $VERSION to 0.78_51

11 years agoThis is 0.78_50 - update META.yml, and add META.json
Nicholas Clark [Fri, 10 May 2013 09:29:29 +0000]
This is 0.78_50 - update META.yml, and add META.json

11 years agoNote the release number, date and name in the CHANGES file.
Nicholas Clark [Fri, 10 May 2013 09:20:00 +0000]
Note the release number, date and name in the CHANGES file.

11 years agoAn alternative test that CvOUTSIDE is being followed.
Nicholas Clark [Fri, 10 May 2013 09:03:57 +0000]
An alternative test that CvOUTSIDE is being followed.

As of v5.17.2, CvOUTSIDE is NULL on cloned closures, unless they contain a
string eval. Hence the size of closures should differ, as long as Size.xs
is correctly following CvOUTSIDE.

(See blead commit a0d2bbd5c47035a4)

11 years agoUpdate Devel-Size for the new form of pad list.
Zefram [Fri, 10 May 2013 08:42:12 +0000]
Update Devel-Size for the new form of pad list.

11 years agoTest that we can measure that recursion increases the size of the PADLIST.
Nicholas Clark [Fri, 10 May 2013 08:38:43 +0000]
Test that we can measure that recursion increases the size of the PADLIST.

11 years agoStubbed subs no longer have CvOUTSIDE set.
Nicholas Clark [Fri, 10 May 2013 07:25:13 +0000]
Stubbed subs no longer have CvOUTSIDE set.

t/code.t was testing whether Devel::Size was following CvOUTSIDE by relying
on the implementation detail that CvOUTSIDE is set for a subroutine that is
explicitly stubbed, and not set for one that is implicitly stubbed at runtime.

v5.17.0 changed the compile-time behaviour so that no stubbed subroutine has
CvOUTSIDE set, which breaks the assumption of this test. Hence change the test
to verify the new behaviour. However, this leaves us currently with no test
for CvOUTSIDE.

(Based on a patch by Zefram. see RT #83903 and perl's commit 8be227ab5eaa23f2)

11 years agoDon't follow CvSTART() if CvROOT() is NULL.
Zefram [Fri, 10 May 2013 07:09:58 +0000]
Don't follow CvSTART() if CvROOT() is NULL.

For v5.17.2, blead switched to a slab allocator for OPs. During subroutine
compilation, the CV's slab is held in CvSTART(), to avoid extending every
PVCV by one more pointer. Once compilation is complete, the optree slab
pointer becomes accessible at an offset from CvROOT(), and CvSTART() is
set to point to the first OP. However, in some cases, PVCVs in the incomplete
state can become visible to Devel::Size, for example by following the
CvOUTSIDE() from BEGIN blocks. So we need to ignore CvSTART() if CvROOT() is
NULL. (Arguably we should always ignore CvSTART(), as the OP that it points to
should be accessible somewhere in the tree referenced by CvROOT(), but that
change can wait for a later date)

(see RT #83903 and perl's commit 8be227ab5eaa23f2)

12 years agoadd .gitignore
Tim Bunce [Wed, 15 Aug 2012 20:51:32 +0000]
add .gitignore

12 years agoSpelling fix to docs from gregor herrmann [CPAN #78766]
Tim Bunce [Wed, 15 Aug 2012 20:23:33 +0000]
Spelling fix to docs from gregor herrmann [CPAN #78766]

12 years agoBump $VERSION to 0.78_50
Nicholas Clark [Mon, 30 Jul 2012 15:26:56 +0000]
Bump $VERSION to 0.78_50

12 years agoThis is 0.78 - update META.yml and META.json
Nicholas Clark [Thu, 26 Jul 2012 14:39:13 +0000]
This is 0.78 - update META.yml and META.json

12 years agoBump $VERSION to 0.78
Nicholas Clark [Thu, 26 Jul 2012 12:26:04 +0000]
Bump $VERSION to 0.78

12 years agoThis is 0.77_51 - update META.yml and META.json
Nicholas Clark [Tue, 17 Jul 2012 14:47:37 +0000]
This is 0.77_51 - update META.yml and META.json

12 years agoCorrect the code for structured exception handling on MSVC.
bulk 88 [Sat, 2 Jun 2012 00:41:58 +0000]
Correct the code for structured exception handling on MSVC.

12 years agoBump $VERSION to 0.77_51
Nicholas Clark [Tue, 17 Jul 2012 14:31:29 +0000]
Bump $VERSION to 0.77_51

12 years agoThis is 0.77_50 - update META.yml, and add META.json
Nicholas Clark [Sat, 11 Feb 2012 16:10:29 +0000]
This is 0.77_50 - update META.yml, and add META.json

12 years agoSkip tests in t/magic.t that use formline on 5.8.1 and 5.8.2
Nicholas Clark [Fri, 10 Feb 2012 20:01:57 +0000]
Skip tests in t/magic.t that use formline on 5.8.1 and 5.8.2

Those versions have a buggy formline that can trigger an assertion failure.

12 years agoRefactor t/globs.t to avoid the side effects of a change to strict.pm
Nicholas Clark [Fri, 10 Feb 2012 19:48:25 +0000]
Refactor t/globs.t to avoid the side effects of a change to strict.pm

As of blead commit b50b20584a1bbc1a, Implement new 'use 5.xxx' plan,
use strict; will write to %^H. Move the eval that creates the subroutine
into a different scope, a new subroutine generate_glob(), so that its
outside pointer chain doesn't include gv_grew(). This avoids problems with
eval ops changing the side of the %^H copies at runtime.

13 years agoBump $VERSION to 0.77_50
Nicholas Clark [Mon, 16 May 2011 12:40:06 +0000]
Bump $VERSION to 0.77_50

13 years agoThis is 0.77 - update META.yml
Nicholas Clark [Mon, 16 May 2011 12:39:00 +0000]
This is 0.77 - update META.yml

13 years agoBump $VERSION to 0.77
Nicholas Clark [Thu, 12 May 2011 16:34:34 +0000]
Bump $VERSION to 0.77

13 years agoThis is 0.76_50 - update META.yml
Nicholas Clark [Thu, 12 May 2011 16:33:04 +0000]
This is 0.76_50 - update META.yml

13 years agoCount the size of the "effective names" of a hash.
Nicholas Clark [Thu, 12 May 2011 16:26:28 +0000]
Count the size of the "effective names" of a hash.

This code is somewhat cheeky, making direct structure accesses.

13 years agoCount HvNAME(), the HV "aux" struct, and the mro_meta struct.
Nicholas Clark [Thu, 12 May 2011 14:04:17 +0000]
Count HvNAME(), the HV "aux" struct, and the mro_meta struct.

13 years agoGvNAME() is shared from 5.10 onwards.
Nicholas Clark [Thu, 12 May 2011 11:28:38 +0000]
GvNAME() is shared from 5.10 onwards.

13 years agoUse GvFILE_HEK(), if present, in preference to GvFILE()
Nicholas Clark [Thu, 12 May 2011 10:57:13 +0000]
Use GvFILE_HEK(), if present, in preference to GvFILE()

13 years agoHandle shared hash key scalars correctly.
Nicholas Clark [Thu, 12 May 2011 10:39:10 +0000]
Handle shared hash key scalars correctly.

13 years agoSplit out HEK size calculation into hek_size().
Nicholas Clark [Thu, 12 May 2011 09:25:19 +0000]
Split out HEK size calculation into hek_size().

Add the shared HE overhead to the total size.

13 years agoAdd a comment to force emacs to use C mode.
Nicholas Clark [Thu, 12 May 2011 08:54:21 +0000]
Add a comment to force emacs to use C mode.

13 years agoAdd a single (void **) cast to make the C code also valid as C++
Nicholas Clark [Thu, 12 May 2011 08:43:02 +0000]
Add a single (void **) cast to make the C code also valid as C++

13 years agoBump $VERSION to 0.76_50
Nicholas Clark [Wed, 11 May 2011 09:02:19 +0000]
Bump $VERSION to 0.76_50

13 years agoThis is 0.76 - update META.yml
Nicholas Clark [Wed, 11 May 2011 08:38:53 +0000]
This is 0.76 - update META.yml

13 years agoBump $VERSION to 0.76
Nicholas Clark [Wed, 11 May 2011 08:38:00 +0000]
Bump $VERSION to 0.76

13 years agoThis is 0.75_52 - update META.yml
Nicholas Clark [Mon, 9 May 2011 20:00:36 +0000]
This is 0.75_52 - update META.yml

13 years agoDon't count PL_sv_placeholder in the size returned.
Nicholas Clark [Mon, 9 May 2011 07:18:18 +0000]
Don't count PL_sv_placeholder in the size returned.

PL_sv_placeholder is a singleton, process wide, so shouldn't count as part of
the size.

13 years agosv_size() can return void once more.
Nicholas Clark [Sun, 8 May 2011 20:16:43 +0000]
sv_size() can return void once more.

All the code that relied on it returning the result of its call to check_new()
has been removed.

13 years agoReinstate 5.005_xx "support".
Nicholas Clark [Sun, 8 May 2011 17:48:33 +0000]
Reinstate 5.005_xx "support".

i.e. it compiles and passes tests.

13 years agoReplace c*OPx macros with their expansions.
Nicholas Clark [Sun, 8 May 2011 17:41:13 +0000]
Replace c*OPx macros with their expansions.

The expansions are 2 characters longer than the macros. The macros are not
present in 5.005.

13 years agoReinstate 5.6.x "support".
Nicholas Clark [Sun, 8 May 2011 08:16:57 +0000]
Reinstate 5.6.x "support".

i.e. it compiles and passes tests.

13 years agoDon't recurse into op_size() on op->pmnext.
Nicholas Clark [Sun, 8 May 2011 07:38:02 +0000]
Don't recurse into op_size() on op->pmnext.

It doesn't point to an OP owned by the current OP - it is used to form a linked
list that reset uses to find regexps to reset. Moreover, prior to 5.8.0 it can
end up pointing to freed memory, which results in much jollity.
[Bug 20010301.005, a.k.a. RT #5935, fixed in cb55de95c99e4650]

13 years agoReinstate weaken(), inadvertently removed by 8c394e1251fdfe38.
Nicholas Clark [Sat, 7 May 2011 18:59:24 +0000]
Reinstate weaken(), inadvertently removed by 8c394e1251fdfe38.

The test isn't testing as much as intended without it.

13 years agoMagic vtables aren't freed when magic is freed, so don't count them.
Nicholas Clark [Sat, 7 May 2011 10:23:01 +0000]
Magic vtables aren't freed when magic is freed, so don't count them.

They are static structures. Anything that assumes otherwise is buggy.

13 years agoCorrectly handle SvOOK scalars. 5.12 and later don't use SvIVX().
Nicholas Clark [Fri, 6 May 2011 19:29:18 +0000]
Correctly handle SvOOK scalars. 5.12 and later don't use SvIVX().

13 years agoppport.h defined NV if necessary, so no need to duplicate that.
Nicholas Clark [Fri, 6 May 2011 19:16:19 +0000]
ppport.h defined NV if necessary, so no need to duplicate that.

13 years agoAdd -DPURIFY sizes to body_sizes[]
Nicholas Clark [Fri, 6 May 2011 19:07:10 +0000]
Add -DPURIFY sizes to body_sizes[]

Use two macros to simplify the logic - MAYBE_OFFSET() where the normal version
subtracts a STRUCT_OFFSET(), and the purify version subtracts nothing, and
MAYBE_PURIFY() where there is not a simple relationship between the two sizes.

13 years agoUse a table for SV body sizes. These incorporate the space saving post 5.8.x
Nicholas Clark [Thu, 5 May 2011 16:04:36 +0000]
Use a table for SV body sizes. These incorporate the space saving post 5.8.x

For now, the sizes under -DPURIFY aren't correct.

13 years agoIn sv_size(), refactor the PV-derivatives to share as much code as possible.
Nicholas Clark [Thu, 5 May 2011 11:45:10 +0000]
In sv_size(), refactor the PV-derivatives to share as much code as possible.

As a side effect, PV"BM"s are now handled correctly on 5.10.0 and later.

13 years agoIn sv_size(), coalesce all calls to magic_size().
Nicholas Clark [Thu, 5 May 2011 09:50:44 +0000]
In sv_size(), coalesce all calls to magic_size().

13 years agoBump $VERSION to 0.75_52
Nicholas Clark [Thu, 5 May 2011 09:15:51 +0000]
Bump $VERSION to 0.75_52

13 years agoThis is 0.75_51 - update META.yml
Nicholas Clark [Thu, 5 May 2011 09:14:23 +0000]
This is 0.75_51 - update META.yml

13 years agoFor other-than-gcc, generate calls to check_new(...)
Nicholas Clark [Thu, 5 May 2011 09:00:07 +0000]
For other-than-gcc, generate calls to check_new(...)

Only use a static array of vtables on gcc. Some other compilers may be happy
with it, but VC certainly isn't. It's only trivial to determine gcc or not.

13 years agoBump $VERSION to 0.75_51
Nicholas Clark [Thu, 5 May 2011 08:24:30 +0000]
Bump $VERSION to 0.75_51

13 years agoThis is 0.75_50 - update META.yml
Nicholas Clark [Thu, 5 May 2011 08:21:20 +0000]
This is 0.75_50 - update META.yml

13 years agoeval $ExtUtils::MakeMaker::VERSION to avoid warnings about _ not being numeric.
Nicholas Clark [Wed, 4 May 2011 20:41:45 +0000]
eval $ExtUtils::MakeMaker::VERSION to avoid warnings about _ not being numeric.

Frustratingly ExtUtils::MakeMaker->VERSION() returns the literal value of
$ExtUtils::MakeMaker::VERSION so it's just as "not numeric" as reading the
scalar directly.

13 years agoRe-indent Makefile.PL consistently.
Nicholas Clark [Wed, 4 May 2011 20:41:00 +0000]
Re-indent Makefile.PL consistently.

13 years agoSimplify magic_size() by knowing that check_new() returns false for NULL.
Nicholas Clark [Wed, 4 May 2011 20:37:24 +0000]
Simplify magic_size() by knowing that check_new() returns false for NULL.

13 years agoAdd the size of mg_len if mg_ptr is non-NULL.
Nicholas Clark [Wed, 4 May 2011 20:24:58 +0000]
Add the size of mg_len if mg_ptr is non-NULL.

With special cases for UTF-8 caching magic, which abuses mg_len, and for
mg_len == HEf_SVKEY

13 years agoFollow mg_obj, which points to an SV.
Nicholas Clark [Wed, 4 May 2011 19:18:39 +0000]
Follow mg_obj, which points to an SV.

13 years agoAdd tests for sizing magic.
Nicholas Clark [Wed, 4 May 2011 19:14:43 +0000]
Add tests for sizing magic.

13 years agoThe core's magic vtables are global constants, so aren't part of the size.
Nicholas Clark [Wed, 4 May 2011 18:41:54 +0000]
The core's magic vtables are global constants, so aren't part of the size.

Parse perl.h to find the names of the vtables' names, and generate code to add
them all in new_state() as "seen".

13 years agoBump $VERSION to 0.75_50
Nicholas Clark [Wed, 4 May 2011 16:10:22 +0000]
Bump $VERSION to 0.75_50