]> git.vpit.fr Git - perl/modules/Scope-Upper.git/log
perl/modules/Scope-Upper.git
12 years agoEnable the "save last context" workaround more selectively
Vincent Pit [Wed, 22 Aug 2012 09:18:22 +0000 (11:18 +0200)]
Enable the "save last context" workaround more selectively

12 years agoVersion requirements overhaul
Vincent Pit [Wed, 18 Jul 2012 21:03:35 +0000 (23:03 +0200)]
Version requirements overhaul

12 years agoTest uplevel's behaviour regarding to match variables more thoroughly
Vincent Pit [Wed, 18 Jul 2012 20:59:16 +0000 (22:59 +0200)]
Test uplevel's behaviour regarding to match variables more thoroughly

12 years agoRequire Module::ExtractUse 0.24 for the Kwalitee test
Vincent Pit [Sun, 19 Feb 2012 13:09:03 +0000 (14:09 +0100)]
Require Module::ExtractUse 0.24 for the Kwalitee test

12 years agoMake sure the POD headings are linkable
Vincent Pit [Fri, 11 Nov 2011 18:59:22 +0000 (19:59 +0100)]
Make sure the POD headings are linkable

12 years agoRename sud->new_uid_storage to sud->tmp_uid_storage
Vincent Pit [Fri, 11 Nov 2011 17:30:17 +0000 (18:30 +0100)]
Rename sud->new_uid_storage to sud->tmp_uid_storage

12 years agoPack uplevel()'s internal data structure more tightly
Vincent Pit [Fri, 11 Nov 2011 17:16:35 +0000 (18:16 +0100)]
Pack uplevel()'s internal data structure more tightly

It is now about 7% smaller on x86_64.

13 years agot/59-unwind-threads.t should always run at least one test
Vincent Pit [Sat, 22 Oct 2011 17:37:07 +0000 (19:37 +0200)]
t/59-unwind-threads.t should always run at least one test

No test means failure.

13 years agoThreads tests may not be able to spawn all the threads
Vincent Pit [Sat, 22 Oct 2011 16:55:36 +0000 (18:55 +0200)]
Threads tests may not be able to spawn all the threads

To work around this :
- move all the threads boilerplate to a new helper test module ;
- capture the warnings/errors that threads->create may throw and reprint
them properly as diagnostics ;
- use Test::Leaner instead of Test::More, as older Test::More sometimes
cause out of sequence bugs ;
- last but not least, do not hardcode the plan and use done_testing with
the actual number of spawned threads instead.

13 years agoThis is 0.18 v0.18
Vincent Pit [Mon, 10 Oct 2011 20:50:59 +0000 (22:50 +0200)]
This is 0.18

13 years agoSkip a destructor test on perl 5.6 in t/74-uid-validate.t
Vincent Pit [Mon, 10 Oct 2011 20:04:36 +0000 (22:04 +0200)]
Skip a destructor test on perl 5.6 in t/74-uid-validate.t

An object destructor is always fired last before 5.8. For example,

    our $y = 1;
    sub X::DESTROY { print $y }
    {
     local $y = 2;
     my $x = bless [], "X"
    }

will print 1 on 5.6 and 2 on 5.8.

13 years agoMake sure the code snippets fit in 80-columns wide terminal
Vincent Pit [Mon, 10 Oct 2011 17:55:39 +0000 (19:55 +0200)]
Make sure the code snippets fit in 80-columns wide terminal

13 years agoTrailing whitespace in tests
Vincent Pit [Mon, 10 Oct 2011 17:48:52 +0000 (19:48 +0200)]
Trailing whitespace in tests

13 years agoImplement uid() and validate_uid()
Vincent Pit [Fri, 9 Sep 2011 23:53:46 +0000 (01:53 +0200)]
Implement uid() and validate_uid()

13 years agoDon't rely on accessing the values of Perl_runops_{standard,debug}
Vincent Pit [Sat, 8 Oct 2011 20:55:31 +0000 (22:55 +0200)]
Don't rely on accessing the values of Perl_runops_{standard,debug}

This doesn't work on Windows, so we have to use PL_runops_{std,dbg} instead.
But those two variables are not available before perl 5.8, so we have to
forbid the whole goto handling altogether on those perls for consistency.

13 years agoFix Changes buggery
Vincent Pit [Mon, 3 Oct 2011 21:57:35 +0000 (23:57 +0200)]
Fix Changes buggery

13 years agoThis is 0.17 v0.17
Vincent Pit [Mon, 3 Oct 2011 21:46:51 +0000 (23:46 +0200)]
This is 0.17

13 years agoTalk about the goto() overhead in the documentation
Vincent Pit [Mon, 3 Oct 2011 21:25:20 +0000 (23:25 +0200)]
Talk about the goto() overhead in the documentation

13 years agoFix goto &xsub in uplevel
Vincent Pit [Sun, 2 Oct 2011 21:00:53 +0000 (23:00 +0200)]
Fix goto &xsub in uplevel

The old debugging hack has been removed, because it could not cope at all
with the XSUB case. It is replaced by an runloop hijack.

Note that a side effect of this change is that su_uplevel_ud tokens are no
longer freed by su_uplevel_restore on pre-5.13.7 perls. This is needed in
order to ensure that the topmost token is available at all time for our
runloop replacement.

13 years agoFix uplevel() recalling into an XSUB
Vincent Pit [Fri, 23 Sep 2011 09:21:31 +0000 (11:21 +0200)]
Fix uplevel() recalling into an XSUB

13 years agoTest that goto-to-uplevel does not mess up returned values
Vincent Pit [Mon, 19 Sep 2011 21:31:22 +0000 (23:31 +0200)]
Test that goto-to-uplevel does not mess up returned values

13 years agoRemove trailing whitespace
Vincent Pit [Mon, 19 Sep 2011 21:16:37 +0000 (23:16 +0200)]
Remove trailing whitespace

13 years agoPrevent simple uplevel argument tests from reifying @_
Vincent Pit [Mon, 19 Sep 2011 21:16:17 +0000 (23:16 +0200)]
Prevent simple uplevel argument tests from reifying @_

13 years agoFix calling goto to replace an uplevel'd subroutine frame
Vincent Pit [Fri, 16 Sep 2011 19:16:54 +0000 (21:16 +0200)]
Fix calling goto to replace an uplevel'd subroutine frame

13 years agoCreate the renamed CV as a shallow copy of the original one
Vincent Pit [Mon, 19 Sep 2011 10:35:15 +0000 (12:35 +0200)]
Create the renamed CV as a shallow copy of the original one

From now they share the exact same pad, without any refcount bump. This
means that we have to handle the renamed CV destruction ourselves by
clearing its padlist entry before freeing it, but we need to reset its
depth anyway before that (or that would cause "still in use" warnings).

This allows us to call pp_entersub directly with the renamed CV as we were
doing earlier, and to remove the exotic destruction dance from
su_uplevel_restore().

13 years agoFix a test in t/60-uplevel-target.t that does not test anything
Vincent Pit [Tue, 13 Sep 2011 21:32:59 +0000 (23:32 +0200)]
Fix a test in t/60-uplevel-target.t that does not test anything

13 years agoDon't rely on being able to access the old context in su_uplevel_restore()
Vincent Pit [Tue, 13 Sep 2011 21:10:36 +0000 (23:10 +0200)]
Don't rely on being able to access the old context in su_uplevel_restore()

It will be overwritten if the callback gotos into another subroutine.
This also fixes "Attempt to free unreferenced scalar" warning when the
debugger is enabled.

13 years agoRename some variables and struct members around su_uplevel()
Vincent Pit [Tue, 13 Sep 2011 19:50:27 +0000 (21:50 +0200)]
Rename some variables and struct members around su_uplevel()

13 years agoIn su_cv_clone(), add stash->cloned_cv backrefs on perl 5.13.x
Vincent Pit [Tue, 13 Sep 2011 17:34:16 +0000 (19:34 +0200)]
In su_cv_clone(), add stash->cloned_cv backrefs on perl 5.13.x

This fixes test failures on debugging perl 5.13.[456].

13 years agoInline Perl_cv_clone() and Perl_new_pad() rt71212
Vincent Pit [Tue, 13 Sep 2011 10:42:15 +0000 (12:42 +0200)]
Inline Perl_cv_clone() and Perl_new_pad()

What we really need to fake the callback's GV is a pure copy of it, but
Perl_cv_clone does not do this : it creates a new copy with a depth of 1
and an empty pad, which is appropriate for pp_anoncode but not for our
situation. The easiest way to fix this is simply to inline Perl_cv_clone()
in our code, set up the copy's depth from the original, and crudely copy
the old pad into a new one.

This fixes closures defined in the uplevel callback that captures lexical
from outside of the uplevel call, and also allows us to remove all the
hacks from the previous su_cv_clone().

13 years agoActivate the correct pad when calling the uplevel'd code
Vincent Pit [Fri, 9 Sep 2011 23:53:13 +0000 (01:53 +0200)]
Activate the correct pad when calling the uplevel'd code

This fixes at least two issues :
- closures defined inside the uplevel callback can now wrap around
lexicals from inside (but not outside yet, this will be fixed by the
next commit).
- state variables in the uplevel callback now work properly.

13 years agoReorder some code in su_uplevel()
Vincent Pit [Fri, 9 Sep 2011 17:30:16 +0000 (19:30 +0200)]
Reorder some code in su_uplevel()

13 years agoMake sure the stack is large enough when returning values from words
Vincent Pit [Wed, 7 Sep 2011 22:18:54 +0000 (00:18 +0200)]
Make sure the stack is large enough when returning values from words

13 years agoSilence some compiler warnings
Vincent Pit [Mon, 5 Sep 2011 17:40:07 +0000 (19:40 +0200)]
Silence some compiler warnings

13 years agoTest unwinding while unwinding
Vincent Pit [Sun, 4 Sep 2011 15:40:14 +0000 (17:40 +0200)]
Test unwinding while unwinding

13 years agoOne more POD wording fix
Vincent Pit [Sun, 4 Sep 2011 15:00:19 +0000 (17:00 +0200)]
One more POD wording fix

Inspired by a fix in Debian.

13 years agoMove the unwind()-related members of the global context in their own struct
Vincent Pit [Sun, 4 Sep 2011 14:10:38 +0000 (16:10 +0200)]
Move the unwind()-related members of the global context in their own struct

Also correct the third argument to Zero() calls used to initialize the
return_op and proxy_op members : the size was passed, while it is supposed
to be the type.

13 years agoAbstract the uplevel storage logic in two new functions
Vincent Pit [Sun, 4 Sep 2011 14:04:57 +0000 (16:04 +0200)]
Abstract the uplevel storage logic in two new functions

Also disable the restore-soonish magic trick on perl 5.13.7 and earlier, as
the core behaves correctly since then.

13 years agoTweak some comments in the uplevel() code
Vincent Pit [Sun, 4 Sep 2011 13:10:00 +0000 (15:10 +0200)]
Tweak some comments in the uplevel() code

13 years agoDon't grow the fake cxstack if it's already large enough
Vincent Pit [Sun, 4 Sep 2011 13:03:28 +0000 (15:03 +0200)]
Don't grow the fake cxstack if it's already large enough

13 years agoFix some typos/wording in POD
Vincent Pit [Sun, 4 Sep 2011 13:00:16 +0000 (15:00 +0200)]
Fix some typos/wording in POD

13 years agoThis is 0.16 v0.16
Vincent Pit [Sat, 3 Sep 2011 23:00:26 +0000 (01:00 +0200)]
This is 0.16

13 years agoSilence some "Attempt to free unreferenced scalar" errors
Vincent Pit [Sat, 3 Sep 2011 22:49:12 +0000 (00:49 +0200)]
Silence some "Attempt to free unreferenced scalar" errors

They were printed during the second benchmark.

13 years agoImplement uplevel()
Vincent Pit [Sat, 3 Sep 2011 22:33:19 +0000 (00:33 +0200)]
Implement uplevel()

13 years agoCorrect a couple of test descriptions
Vincent Pit [Sat, 3 Sep 2011 22:32:54 +0000 (00:32 +0200)]
Correct a couple of test descriptions

13 years agoThis is 0.15 v0.15
Vincent Pit [Wed, 24 Aug 2011 14:16:46 +0000 (16:16 +0200)]
This is 0.15

13 years agoUpdate bundled Test::Leaner to 0.04
Vincent Pit [Wed, 24 Aug 2011 13:57:57 +0000 (15:57 +0200)]
Update bundled Test::Leaner to 0.04

13 years agoEncode the README file in UTF-8
Vincent Pit [Wed, 24 Aug 2011 12:52:01 +0000 (14:52 +0200)]
Encode the README file in UTF-8

13 years agoIgnore MYMETA.json
Vincent Pit [Mon, 18 Jul 2011 14:19:13 +0000 (16:19 +0200)]
Ignore MYMETA.json

13 years agoAdd META.json
Vincent Pit [Mon, 18 Jul 2011 14:18:54 +0000 (16:18 +0200)]
Add META.json

13 years agoReplace $] by "$]"
Vincent Pit [Mon, 18 Jul 2011 14:16:57 +0000 (16:16 +0200)]
Replace $] by "$]"

An old bug could cause $] to be initialized to a wrong decimal value.
Since its stringified value was always right, we use it instead.

Occurences of $^V were also replaced by $].

13 years agoUpdate bundled Test::Leaner to 0.03
Vincent Pit [Mon, 18 Jul 2011 14:04:10 +0000 (16:04 +0200)]
Update bundled Test::Leaner to 0.03

13 years agoSwitch to qw<>
Vincent Pit [Sat, 5 Mar 2011 23:28:42 +0000 (00:28 +0100)]
Switch to qw<>

13 years agoInvalidate the method cache when localizing subroutines
Vincent Pit [Mon, 28 Feb 2011 01:11:43 +0000 (02:11 +0100)]
Invalidate the method cache when localizing subroutines

13 years agoThis is 0.14 v0.14
Vincent Pit [Sun, 27 Feb 2011 00:01:11 +0000 (01:01 +0100)]
This is 0.14

13 years agoReally include Test::Leaner 0.02
Vincent Pit [Sat, 26 Feb 2011 23:28:51 +0000 (00:28 +0100)]
Really include Test::Leaner 0.02

13 years agoCompatibility fix for perl 5.13.10 rt64997
Vincent Pit [Sat, 26 Feb 2011 23:03:30 +0000 (00:03 +0100)]
Compatibility fix for perl 5.13.10

This solves RT #64997.

13 years agoRun lengthy tests with Test::Leaner
Vincent Pit [Sun, 6 Feb 2011 15:29:28 +0000 (16:29 +0100)]
Run lengthy tests with Test::Leaner

This includes Test::Leaner 0.02.

13 years agoBump copyright year
Vincent Pit [Wed, 5 Jan 2011 20:07:47 +0000 (21:07 +0100)]
Bump copyright year

13 years agoPreemptively remove uses of lvalue GvCV
Vincent Pit [Wed, 5 Jan 2011 20:06:54 +0000 (21:06 +0100)]
Preemptively remove uses of lvalue GvCV

13 years agoThis is 0.13 v0.13
Vincent Pit [Mon, 20 Dec 2010 01:03:55 +0000 (02:03 +0100)]
This is 0.13

13 years agoSkip threads tests unless perl version is 5.13.4 or greater
Vincent Pit [Mon, 20 Dec 2010 00:25:57 +0000 (01:25 +0100)]
Skip threads tests unless perl version is 5.13.4 or greater

There was a long standing bug in the handling of GV <-> CV double linkage
that could (and explicitely did with a poisonous perl) cause segfaults at
thread destruction. It got fixed by Dave in commit 803f274 which went in
5.13.3, but the fix was amended for 5.13.4 in commit 09aad8f. Since it's
not really fair for the user to not be able to install the module because
of this, we skip the threads tests unless perl is at least 5.13.4.

13 years agoCompatibility fix for perl 5.13.8 rt63378
Vincent Pit [Mon, 20 Dec 2010 00:20:44 +0000 (01:20 +0100)]
Compatibility fix for perl 5.13.8

This fixes RT #63378.

13 years agoIgnore MYMETA.yml
Vincent Pit [Mon, 20 Dec 2010 00:19:16 +0000 (01:19 +0100)]
Ignore MYMETA.yml

13 years agoFix stack corruption when using unwind() under Devel::NYTProf rt61904
Vincent Pit [Sun, 19 Dec 2010 23:54:15 +0000 (00:54 +0100)]
Fix stack corruption when using unwind() under Devel::NYTProf

This fixes RT #61904.

Thanks Sergey Aleynikov for contributing the fix.

14 years agoThis is 0.12 v0.12
Vincent Pit [Wed, 19 May 2010 00:42:30 +0000 (02:42 +0200)]
This is 0.12

14 years agoFix for the official 5.13.0 release
Vincent Pit [Wed, 19 May 2010 00:32:21 +0000 (02:32 +0200)]
Fix for the official 5.13.0 release

14 years agoSwap the ud and cxix arguments of su_init()
Vincent Pit [Tue, 18 May 2010 21:53:58 +0000 (23:53 +0200)]
Swap the ud and cxix arguments of su_init()

14 years agoStop leaking SVs when trying to localize an element out of a non array/hash
Vincent Pit [Tue, 18 May 2010 21:50:18 +0000 (23:50 +0200)]
Stop leaking SVs when trying to localize an element out of a non array/hash

Achieve this by introducing a new SU_UD_LOCALIZE_FREE() macro.

14 years agoUse a PPCODE: section in CLONE
Vincent Pit [Tue, 18 May 2010 21:10:33 +0000 (23:10 +0200)]
Use a PPCODE: section in CLONE

14 years agoMake su_ud_localize_init() return the required slot size
Vincent Pit [Tue, 18 May 2010 20:57:35 +0000 (22:57 +0200)]
Make su_ud_localize_init() return the required slot size

This strips away all magical size value.

Also, fix the save_gp() size on 5.13, since it now uses 4 slots.

14 years agoSave a mock pointer as the placeholder instead of an int
Vincent Pit [Tue, 18 May 2010 19:57:14 +0000 (21:57 +0200)]
Save a mock pointer as the placeholder instead of an int

Since 5.13, small ints are saved with only two save stack slots, so it's
better to use something with a fixed size instead.

14 years agoTie the array after localizing it in t/{34,44}-*-magic.t
Vincent Pit [Tue, 18 May 2010 19:48:12 +0000 (21:48 +0200)]
Tie the array after localizing it in t/{34,44}-*-magic.t

This fixes failures under perl 5.13 since Dave made "local @tied" untie
the array.

14 years agoSkip two pairs of tests in t/20-localize-target.t with perl 5.8.0
Vincent Pit [Tue, 18 May 2010 19:46:41 +0000 (21:46 +0200)]
Skip two pairs of tests in t/20-localize-target.t with perl 5.8.0

We can't actually localize through a reference before 5.8.1.

14 years agoThis is 0.11 v0.11
Vincent Pit [Fri, 16 Apr 2010 23:16:42 +0000 (01:16 +0200)]
This is 0.11

14 years agoSkip t/05-words.t when ran under the debugger
Vincent Pit [Fri, 16 Apr 2010 22:13:59 +0000 (00:13 +0200)]
Skip t/05-words.t when ran under the debugger

With this change, the whole test suite passes under the debugger. Hurray!

14 years agoSilence a gcc warning
Vincent Pit [Fri, 16 Apr 2010 22:12:10 +0000 (00:12 +0200)]
Silence a gcc warning

14 years agoStop skipping frames as a pop optimization
Vincent Pit [Fri, 16 Apr 2010 21:40:49 +0000 (23:40 +0200)]
Stop skipping frames as a pop optimization

This caused breakage under the debugger (and most likely everywhere).

14 years agoA couple of SEE ALSO
Vincent Pit [Fri, 16 Apr 2010 21:12:39 +0000 (23:12 +0200)]
A couple of SEE ALSO

14 years agoPOD tags harmonization
Vincent Pit [Fri, 16 Apr 2010 21:03:05 +0000 (23:03 +0200)]
POD tags harmonization

14 years agoDisallow reference localization targets
Vincent Pit [Fri, 16 Apr 2010 21:00:59 +0000 (23:00 +0200)]
Disallow reference localization targets

14 years agoBe stricter about what localize_elem() accepts
Vincent Pit [Fri, 16 Apr 2010 20:47:34 +0000 (22:47 +0200)]
Be stricter about what localize_elem() accepts

14 years agoFix numerous localizations in the same scope not happening
Vincent Pit [Fri, 16 Apr 2010 19:47:59 +0000 (21:47 +0200)]
Fix numerous localizations in the same scope not happening

14 years agoImproved synopsys
Vincent Pit [Fri, 16 Apr 2010 14:31:07 +0000 (16:31 +0200)]
Improved synopsys

14 years agoCorrect two comments in a sample script
Vincent Pit [Fri, 16 Apr 2010 13:29:07 +0000 (15:29 +0200)]
Correct two comments in a sample script

14 years agoAssorted documentation tweaks and clarifications
Vincent Pit [Fri, 16 Apr 2010 13:26:34 +0000 (15:26 +0200)]
Assorted documentation tweaks and clarifications

14 years agoProperly vivify nonexistent glob slots rt55593
Vincent Pit [Thu, 15 Apr 2010 23:00:27 +0000 (01:00 +0200)]
Properly vivify nonexistent glob slots

This fixes RT #55593.

14 years agoA better explaination of how string symbols work
Vincent Pit [Thu, 15 Apr 2010 22:44:05 +0000 (00:44 +0200)]
A better explaination of how string symbols work

14 years agoPOD formatting nit
Vincent Pit [Thu, 15 Apr 2010 22:33:51 +0000 (00:33 +0200)]
POD formatting nit

14 years agoAlso apply the context overwrite workaround when not under OP_DIE rt56301
Vincent Pit [Thu, 15 Apr 2010 21:44:02 +0000 (23:44 +0200)]
Also apply the context overwrite workaround when not under OP_DIE

This fixes RT #56301.

14 years agoThis is 0.10 v0.10
Vincent Pit [Mon, 18 Jan 2010 23:47:29 +0000 (00:47 +0100)]
This is 0.10

14 years agoPoint to Continuation::Escape
Vincent Pit [Mon, 18 Jan 2010 23:42:56 +0000 (00:42 +0100)]
Point to Continuation::Escape

14 years agoA somewhat more robust handling of debugging frames
Vincent Pit [Mon, 18 Jan 2010 22:50:25 +0000 (23:50 +0100)]
A somewhat more robust handling of debugging frames

14 years agoForge a better testdeb rule
Vincent Pit [Mon, 18 Jan 2010 22:04:33 +0000 (23:04 +0100)]
Forge a better testdeb rule

14 years agoBump copyright year
Vincent Pit [Mon, 18 Jan 2010 21:51:22 +0000 (22:51 +0100)]
Bump copyright year

14 years agoSilence a switch warning
Vincent Pit [Mon, 18 Jan 2010 21:41:01 +0000 (22:41 +0100)]
Silence a switch warning

14 years agoUse SvREFCNT_inc_simple_void() whenever possible
Vincent Pit [Mon, 18 Jan 2010 21:40:18 +0000 (22:40 +0100)]
Use SvREFCNT_inc_simple_void() whenever possible

14 years agoStop treating the ENTER/LEAVE couple from entersub specially
Vincent Pit [Mon, 18 Jan 2010 21:21:39 +0000 (22:21 +0100)]
Stop treating the ENTER/LEAVE couple from entersub specially

14 years agoDiscover the type of localization immediately when localize() is called
Vincent Pit [Mon, 18 Jan 2010 20:55:22 +0000 (21:55 +0100)]
Discover the type of localization immediately when localize() is called

So that we can reserve the appropriate size on the save stack when a glob is localized with perl 5.8.8 or earlier.

14 years agoMore debugging info tweaks
Vincent Pit [Mon, 18 Jan 2010 19:49:36 +0000 (20:49 +0100)]
More debugging info tweaks