r73691 - in /branches/upstream/libdata-alias-perl/current: Alias.xs Changes MANIFEST META.yml README lib/Data/Alias.pm t/pod_cvg.t t/pod_syn.t
jotamjr-guest at users.alioth.debian.org
jotamjr-guest at users.alioth.debian.org
Thu Apr 28 03:52:22 UTC 2011
Author: jotamjr-guest
Date: Thu Apr 28 03:50:24 2011
New Revision: 73691
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73691
Log:
[svn-upgrade] new version libdata-alias-perl (1.14)
Added:
branches/upstream/libdata-alias-perl/current/t/pod_cvg.t
branches/upstream/libdata-alias-perl/current/t/pod_syn.t
Modified:
branches/upstream/libdata-alias-perl/current/Alias.xs
branches/upstream/libdata-alias-perl/current/Changes
branches/upstream/libdata-alias-perl/current/MANIFEST
branches/upstream/libdata-alias-perl/current/META.yml
branches/upstream/libdata-alias-perl/current/README
branches/upstream/libdata-alias-perl/current/lib/Data/Alias.pm
Modified: branches/upstream/libdata-alias-perl/current/Alias.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/Alias.xs?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/Alias.xs (original)
+++ branches/upstream/libdata-alias-perl/current/Alias.xs Thu Apr 28 03:50:24 2011
@@ -182,7 +182,11 @@
#endif
#define SVs_PADFLAGS (SVs_PADBUSY|SVs_PADMY|SVs_PADTMP)
+#ifdef pp_dorassign
+#define DA_HAVE_OP_DORASSIGN 1
+#else
#define DA_HAVE_OP_DORASSIGN (PERL_COMBI_VERSION >= 5009000)
+#endif
#define DA_TIED_ERR "Can't %s alias %s tied %s"
#define DA_ODD_HASH_ERR "Odd number of elements in hash assignment"
@@ -216,7 +220,6 @@
#define dDA SV *_da, **_dap
#define dDAforce SV *_da = *DA_FETCH(FALSE)
-#define da_peeps (*(I32 *) &SvCUR(_da))
#define da_inside (*(I32 *) &SvIVX(_da))
#define da_iscope (*(PERL_CONTEXT **) &SvPVX(_da))
#define da_old_peepp (*(void (**)(pTHX_ OP *)) &LvTARG(_da))
@@ -231,7 +234,6 @@
#define DA_INIT
STATIC CV *da_cv, *da_cvc;
-STATIC I32 da_peeps;
STATIC I32 da_inside;
STATIC PERL_CONTEXT *da_iscope;
STATIC void (*da_old_peepp)(pTHX_ OP *);
@@ -243,7 +245,7 @@
STATIC OP *da_tag_entersub(pTHX) { return NORMAL; }
STATIC void da_peep(pTHX_ OP *o);
-STATIC int da_peep2(pTHX_ OP *o);
+STATIC void da_peep2(pTHX_ OP *o);
STATIC SV *da_fetch(pTHX_ SV *a1, SV *a2) {
switch ((Size_t) a1) {
@@ -1354,18 +1356,12 @@
PERL_CONTEXT *iscope = da_iscope;
I32 inside = da_inside;
I32 cxi = (cxstack_ix < cxstack_max) ? cxstack_ix + 1 : cxinc();
- void (*peepp)(pTHX_ OP *) = PL_peepp;
OP *ret;
da_iscope = &cxstack[cxi];
da_inside = 1;
- if (peepp != da_peep) {
- da_old_peepp = peepp;
- PL_peepp = da_peep;
- }
ret = PL_ppaddr[OP_ENTEREVAL](aTHX);
da_iscope = iscope;
da_inside = inside;
- PL_peepp = peepp;
return ret;
}
@@ -1536,10 +1532,7 @@
break;
case OP_LIST:
if (op->op_ppaddr == da_tag_list) {
- if (da_peep2(aTHX_ op)) {
- dDAforce;
- PL_peepp = da_old_peepp;
- }
+ da_peep2(aTHX_ op);
return hits;
}
break;
@@ -1659,14 +1652,13 @@
return hits;
}
-STATIC int da_peep2(pTHX_ OP *o) {
+STATIC void da_peep2(pTHX_ OP *o) {
OP *sib, *k;
int useful;
while (o->op_ppaddr != da_tag_list) {
while ((sib = o->op_sibling)) {
if ((o->op_flags & OPf_KIDS) && (k = cUNOPo->op_first)){
- if (da_peep2(aTHX_ k))
- return 1;
+ da_peep2(aTHX_ k);
} else switch (o->op_type ? o->op_type : o->op_targ) {
case_OP_SETSTATE_
case OP_NEXTSTATE:
@@ -1676,7 +1668,7 @@
o = sib;
}
if (!(o->op_flags & OPf_KIDS) || !(o = cUNOPo->op_first))
- return 0;
+ return;
}
useful = o->op_private & OPpUSEFUL;
op_null(o);
@@ -1702,10 +1694,6 @@
}
}
}
- {
- dDAforce;
- return !--da_peeps;
- }
}
STATIC void da_peep(pTHX_ OP *o) {
@@ -1719,8 +1707,8 @@
o = tmp;
if (da_transform(aTHX_ o, FALSE))
da_inside = 2;
- } else if (da_peep2(aTHX_ o)) {
- PL_peepp = da_old_peepp;
+ } else {
+ da_peep2(aTHX_ o);
}
LEAVE;
}
@@ -1835,10 +1823,6 @@
if (start_s < PL_bufptr)
memset(start_s, ' ', PL_bufptr-start_s);
}
- }
- if (!da_peeps++) {
- da_old_peepp = PL_peepp;
- PL_peepp = da_peep;
}
if (da_iscope != &cxstack[cxstack_ix]) {
SAVEVPTR(da_iscope);
@@ -1916,6 +1900,8 @@
PL_check[OP_ENTERSUB] = da_ck_entersub;
}
CvLVALUE_on(get_cv("Data::Alias::deref", TRUE));
+ da_old_peepp = PL_peepp;
+ PL_peepp = da_peep;
}
void
Modified: branches/upstream/libdata-alias-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/Changes?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/Changes (original)
+++ branches/upstream/libdata-alias-perl/current/Changes Thu Apr 28 03:50:24 2011
@@ -1,3 +1,13 @@
+version 1.14; 2011-04-27
+
+ * bugfix: never unhook peephole optimiser, because unhooking is liable
+ to fail if anything else hooked it
+
+ * bugfix: revise check for dorassign opcode to cope with FreeBSD's
+ mutant Perl 5.8 that has it
+
+ * test POD syntax and coverage
+
version 1.13; 2011-04-25
* bugfix: prevent the lexer getting confused if the first thing inside
Modified: branches/upstream/libdata-alias-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/MANIFEST?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/MANIFEST (original)
+++ branches/upstream/libdata-alias-perl/current/MANIFEST Thu Apr 28 03:50:24 2011
@@ -45,3 +45,5 @@
t/lib/Test/Builder.pm
t/lib/Test/More.pm
t/lib/Test/Simple.pm
+t/pod_cvg.t
+t/pod_syn.t
Modified: branches/upstream/libdata-alias-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/META.yml?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/META.yml (original)
+++ branches/upstream/libdata-alias-perl/current/META.yml Thu Apr 28 03:50:24 2011
@@ -16,4 +16,4 @@
- t
requires:
perl: 5.8.1
-version: 1.13
+version: 1.14
Modified: branches/upstream/libdata-alias-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/README?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/README (original)
+++ branches/upstream/libdata-alias-perl/current/README Thu Apr 28 03:50:24 2011
@@ -1,4 +1,4 @@
-Data::Alias 1.13 - Comprehensive set of aliasing operations
+Data::Alias 1.14 - Comprehensive set of aliasing operations
System requirements:
@@ -318,15 +318,13 @@
replaces operations within the scope of "alias" by aliasing variants.
For those familiar with perl's internals: it triggers on a ck_rv2cv
- which resolves to the imported "alias" sub, and does a parser hack to
- allow the "alias BLOCK" syntax. When the ck_entersub is triggered that
- corresponds to it, the op is marked to be found later. The actual work
- is done in a peep-hook which is installed on the ck_rv2cv trigger, and
- processes the marked entersub and its children, replacing the pp_addrs
- with aliasing replacements. The peep hook will also take care of any
- subs defined within the lexical (but not dynamical) scope between the
- ck_rv2cv and the ck_entersub. When no marked entersubs remain, the
- Data::Alias-peeper stops and is deinstalled.
+ which resolves to the imported "alias" sub, and does a parser hack
+ to allow the "alias BLOCK" syntax. When the ck_entersub is triggered
+ that corresponds to it, the op is marked to be found later. The actual
+ work is done in a peep-hook, which processes the marked entersub and
+ its children, replacing the pp_addrs with aliasing replacements. The
+ peep hook will also take care of any subs defined within the lexical
+ (but not dynamical) scope between the ck_rv2cv and the ck_entersub.
KNOWN ISSUES
Lexical variables
Modified: branches/upstream/libdata-alias-perl/current/lib/Data/Alias.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/lib/Data/Alias.pm?rev=73691&op=diff
==============================================================================
--- branches/upstream/libdata-alias-perl/current/lib/Data/Alias.pm (original)
+++ branches/upstream/libdata-alias-perl/current/lib/Data/Alias.pm Thu Apr 28 03:50:24 2011
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = '1.13';
+our $VERSION = '1.14';
use base 'Exporter';
use base 'DynaLoader';
@@ -335,12 +335,11 @@
For those familiar with perl's internals: it triggers on a ck_rv2cv which
resolves to the imported C<alias> sub, and does a parser hack to allow the
C<alias BLOCK> syntax. When the ck_entersub is triggered that corresponds to
-it, the op is marked to be found later. The actual work is done in a peep-hook
-which is installed on the ck_rv2cv trigger, and processes the marked entersub
+it, the op is marked to be found later. The actual work is done in a peep-hook,
+which processes the marked entersub
and its children, replacing the pp_addrs with aliasing replacements. The peep
hook will also take care of any subs defined within the lexical (but not
-dynamical) scope between the ck_rv2cv and the ck_entersub. When no marked
-entersubs remain, the Data::Alias-peeper stops and is deinstalled.
+dynamical) scope between the ck_rv2cv and the ck_entersub.
=head1 KNOWN ISSUES
Added: branches/upstream/libdata-alias-perl/current/t/pod_cvg.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/t/pod_cvg.t?rev=73691&op=file
==============================================================================
--- branches/upstream/libdata-alias-perl/current/t/pod_cvg.t (added)
+++ branches/upstream/libdata-alias-perl/current/t/pod_cvg.t Thu Apr 28 03:50:24 2011
@@ -1,0 +1,9 @@
+use warnings;
+use strict;
+
+use Test::More;
+plan skip_all => "Test::Pod::Coverage not available"
+ unless eval "use Test::Pod::Coverage; 1";
+Test::Pod::Coverage::all_pod_coverage_ok();
+
+1;
Added: branches/upstream/libdata-alias-perl/current/t/pod_syn.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-alias-perl/current/t/pod_syn.t?rev=73691&op=file
==============================================================================
--- branches/upstream/libdata-alias-perl/current/t/pod_syn.t (added)
+++ branches/upstream/libdata-alias-perl/current/t/pod_syn.t Thu Apr 28 03:50:24 2011
@@ -1,0 +1,8 @@
+use warnings;
+use strict;
+
+use Test::More;
+plan skip_all => "Test::Pod not available" unless eval "use Test::Pod 1.00; 1";
+Test::Pod::all_pod_files_ok();
+
+1;
More information about the Pkg-perl-cvs-commits
mailing list