r73693 - in /trunk/libdata-alias-perl: Alias.xs Changes MANIFEST META.yml README debian/changelog 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 04:01:24 UTC 2011


Author: jotamjr-guest
Date: Thu Apr 28 04:01:09 2011
New Revision: 73693

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73693
Log:
New upstream release

Added:
    trunk/libdata-alias-perl/t/pod_cvg.t
      - copied unchanged from r73692, branches/upstream/libdata-alias-perl/current/t/pod_cvg.t
    trunk/libdata-alias-perl/t/pod_syn.t
      - copied unchanged from r73692, branches/upstream/libdata-alias-perl/current/t/pod_syn.t
Modified:
    trunk/libdata-alias-perl/Alias.xs
    trunk/libdata-alias-perl/Changes
    trunk/libdata-alias-perl/MANIFEST
    trunk/libdata-alias-perl/META.yml
    trunk/libdata-alias-perl/README
    trunk/libdata-alias-perl/debian/changelog
    trunk/libdata-alias-perl/lib/Data/Alias.pm

Modified: trunk/libdata-alias-perl/Alias.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/Alias.xs?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/Alias.xs (original)
+++ trunk/libdata-alias-perl/Alias.xs Thu Apr 28 04:01:09 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: trunk/libdata-alias-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/Changes?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/Changes (original)
+++ trunk/libdata-alias-perl/Changes Thu Apr 28 04:01:09 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: trunk/libdata-alias-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/MANIFEST?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/MANIFEST (original)
+++ trunk/libdata-alias-perl/MANIFEST Thu Apr 28 04:01:09 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: trunk/libdata-alias-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/META.yml?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/META.yml (original)
+++ trunk/libdata-alias-perl/META.yml Thu Apr 28 04:01:09 2011
@@ -16,4 +16,4 @@
     - t
 requires: 
   perl: 5.8.1
-version: 1.13
+version: 1.14

Modified: trunk/libdata-alias-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/README?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/README (original)
+++ trunk/libdata-alias-perl/README Thu Apr 28 04:01:09 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: trunk/libdata-alias-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/debian/changelog?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/debian/changelog (original)
+++ trunk/libdata-alias-perl/debian/changelog Thu Apr 28 04:01:09 2011
@@ -1,3 +1,9 @@
+libdata-alias-perl (1.14-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Jotam Jr. Trejo <jotamjr at debian.org.sv>  Wed, 27 Apr 2011 21:53:36 -0600
+
 libdata-alias-perl (1.13-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libdata-alias-perl/lib/Data/Alias.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdata-alias-perl/lib/Data/Alias.pm?rev=73693&op=diff
==============================================================================
--- trunk/libdata-alias-perl/lib/Data/Alias.pm (original)
+++ trunk/libdata-alias-perl/lib/Data/Alias.pm Thu Apr 28 04:01:09 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
 




More information about the Pkg-perl-cvs-commits mailing list