The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 04
Generate.xs 29
MANIFEST 12
META.json 051
META.yml 2323
SIGNATURE 1213
lib/B/Generate.pm 11
t/basic.t 119
t/op_list.t 02
9 files changed (This is a version diff) 50114
@@ -1,5 +1,9 @@
 Revision history for the Perl extension B::Generate.
 
+1.48 - (Reini Urban)
+   - Support the 5.20 changes so far (BIND vs INVLIST)
+   - Simplify tautological (sv)->sv_flags != SVTYPEMASK to !SvIS_FREED(sv)
+
 1.47 - (Reini Urban)
    - Support the 5.17.4 boolkeys removal. (andk)
 
@@ -53,9 +53,13 @@ typedef AV PAD;
 # define PadARRAY		AvARRAY
 #endif
 
+#ifndef SvIS_FREED
+#  define SvIS_FREED(sv) ((sv)->sv_flags == SVTYPEMASK)
+#endif
+
 static const char* const svclassnames[] = {
     "B::NULL",
-#if PERL_VERSION >= 9
+#if PERL_VERSION >= 9 && PERL_VERSION < 19
     "B::BIND",
 #endif
     "B::IV",
@@ -64,6 +68,9 @@ static const char* const svclassnames[] = {
     "B::RV",
 #endif
     "B::PV",
+#if PERL_VERSION >= 19
+    "B::INVLIST",
+#endif
     "B::PVIV",
     "B::PVNV",
     "B::PVMG",
@@ -236,7 +243,7 @@ find_cv_by_root(OP* o) {
     for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) {
       svend = &sva[SvREFCNT(sva)];
       for (sv = sva + 1; sv < svend; ++sv) {
-        if (SvTYPE(sv) != SVTYPEMASK && SvREFCNT(sv)) {
+        if (!SvIS_FREED(sv) && SvREFCNT(sv)) {
           if (SvTYPE(sv) == SVt_PVCV &&
              CvROOT(sv) == root
              ) {
@@ -17,5 +17,6 @@ t/op_list_bgen.t
 t/scope.t
 t/svclasses.t
 typemap
-META.yml                                 Module meta-data (added by MakeMaker)
+META.yml                                 Module YAML meta-data (added by MakeMaker)
+META.json                                Module JSON meta-data (added by MakeMaker)
 SIGNATURE                                Public-key signature (added by MakeMaker)
@@ -0,0 +1,51 @@
+{
+   "abstract" : "Create your own op trees.",
+   "author" : [
+      "Simon Cozens"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.78, CPAN::Meta::Converter version 2.131560",
+   "license" : [
+      "unknown"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "B-Generate",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "B" : "0",
+            "ExtUtils::CBuilder" : "0",
+            "ExtUtils::Embed" : "0"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "license" : [
+         "http://dev.perl.org/licenses/"
+      ],
+      "repository" : {
+         "url" : "http://github.com/rurban/b-generate"
+      }
+   },
+   "version" : "1.48"
+}
@@ -1,27 +1,27 @@
---- #YAML:1.0
-name:               B-Generate
-version:            1.47
-abstract:           Create your own op trees.
+---
+abstract: 'Create your own op trees.'
 author:
-    - Simon Cozens
-license:            unknown
-distribution_type:  module
-configure_requires:
-    ExtUtils::MakeMaker:  0
+  - 'Simon Cozens'
 build_requires:
-    ExtUtils::MakeMaker:  0
+  ExtUtils::MakeMaker: 0
+configure_requires:
+  ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.78, CPAN::Meta::Converter version 2.131560'
+license: unknown
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: B-Generate
+no_index:
+  directory:
+    - t
+    - inc
 requires:
-    B:                   0
-    ExtUtils::CBuilder:  0
-    ExtUtils::Embed:     0
+  B: 0
+  ExtUtils::CBuilder: 0
+  ExtUtils::Embed: 0
 resources:
-    license:     http://dev.perl.org/licenses/
-    repository:  http://github.com/rurban/b-generate
-no_index:
-    directory:
-        - t
-        - inc
-generated_by:       ExtUtils::MakeMaker version 6.56
-meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+  license: http://dev.perl.org/licenses/
+  repository: http://github.com/rurban/b-generate
+version: 1.48
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.68.
+signed via the Module::Signature module, version 0.73.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -15,29 +15,30 @@ not run its Makefile.PL or Build.PL.
 Hash: SHA1
 
 SHA1 be0627fff2e8aef3d2a14d5d7486babc8a4873ba Artistic
-SHA1 d612c9506a21d7adf68802b5545c154105ea84a6 Changes
+SHA1 13dab9a510c88d490f8b7720e9eb9caa67d6c6b2 Changes
 SHA1 18eaf66587c5eea277721d5e569a6e3cd869f855 Copying
-SHA1 f4679fdb0057dd642a274ade95d66646d349333a Generate.xs
-SHA1 a28447486629c387ad0d7b3821a0939afe255954 MANIFEST
-SHA1 89768efbea7f1c0d93214ab3dbe238b0b713bc2f META.yml
+SHA1 8192c5a9c162d2865ce343fb061e868e1114556b Generate.xs
+SHA1 fb7679fd08bc61917a99d849e08b24c95e453d4f MANIFEST
+SHA1 9afec55ab82ddcf84cfa4cb81d7589b1ee592b0d META.json
+SHA1 060e880c327b55ded64b55af0bd9290088970c14 META.yml
 SHA1 2e7ea115f21fb5f8ecda20133afc57b2e6c2758a Makefile.PL
 SHA1 6ac75dc52f2e89098d8bb1c7e91bc32e00723c03 README
-SHA1 c05bb70581acc18197099a7f5c66216d53f2b3d7 lib/B/Generate.pm
-SHA1 15e53b80c015e065148fd9b325f2700747e6b9ad t/basic.t
+SHA1 c9b94feeed18aa75182223f094106e00d069b2bd lib/B/Generate.pm
+SHA1 d4e55ed71ac604dd492c90c8dc638be30bb36dfe t/basic.t
 SHA1 fda442da609b89e14b07b6a23f126d7eb408f45d t/const.t
 SHA1 b26e810ddc4103ec7383dc380033c644577af030 t/cpan70396.t
 SHA1 30d1226a9629d065d03374419b4ed3da4f05b3d3 t/cpan70398.t
 SHA1 6ce284ce756540d81bdaed2aa3209eae7911faf8 t/find_cv.t
 SHA1 fec0a62196b7891117b983c6eff7d9df6ea8b476 t/new_cv.t
-SHA1 47ade10a61d9fc44878633226128bf16c195da9c t/op_list.t
+SHA1 342bc935de1e6895e61c191c4b72ef50bb769fbd t/op_list.t
 SHA1 20387883055f055ffa54cbaf5a383adf2ed40fa1 t/op_list_bgen.t
 SHA1 82692842d2e3df167aa11b828b3095cc06c15a75 t/scope.t
 SHA1 dea4c541e4930e8b54d7fedbd1fb495579d2fa87 t/svclasses.t
 SHA1 af9dc31ad44cf60a643af272929c022f4fe0b1d2 typemap
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.12 (GNU/Linux)
+Version: GnuPG v1.4.14 (GNU/Linux)
 
-iEYEARECAAYFAlB22x8ACgkQmm2SYo/9yUJMmQCfU9zyT17QcgsHxcOHoJGYXS3P
-9zEAn1oTuLDeIvBfwQODsqA6FWNbq+B7
-=lj21
+iEYEARECAAYFAlJJo9IACgkQmm2SYo/9yUI7GQCfRsw2jsv/ZRFIoWuVSfht6A8V
+aQEAn0FEAMcCAF5PWWGppXtGTWySFBa+
+=PJG/
 -----END PGP SIGNATURE-----
@@ -8,7 +8,7 @@ use B ();
 require DynaLoader;
 use vars qw( @ISA $VERSION );
 @ISA = qw(DynaLoader);
-$VERSION = '1.47';
+$VERSION = '1.48';
 
 {
     # 'no warnings' does not work.
@@ -12,10 +12,10 @@ use Config ();
 
 sub debug_const {
   my $x = $_[0];
-  my $pad = $_[1]; # only needd threaded
-  #diag "const ",ref($x); #," (",$x->flagspv,") ",$x->privatepv;
+  my $pad = $_[1]; # only needed threaded
+  #diag "const ",ref($x); #," (",$x->flagspv,") ",$x->privatepv if $DEBUG;
   my $sv = !${$x->sv} ? $pad->[$x->targ] : $x->sv;
-  #diag "const->sv ",ref($sv);
+  #diag "const->sv ",ref($sv) if $DEBUG;
   my $val = ref($sv) eq 'B::SPECIAL' ? ["Null", "sv_undef", "sv_yes", "sv_no"]->[${$sv}]
     : (ref($sv) eq 'B::NULL' ? 'undef' : $sv->sv);
   if (!${$x->sv}) {
@@ -29,8 +29,8 @@ sub debug_const {
 CHECK
 {
     my ($x,$y,$z);
-    # $DB::single=1 if defined &DB::DB;
-    my $DEBUG = 0;
+    $DB::single=1 if defined &DB::DB;
+    my $DEBUG;
 
     # Replace add op with subtract op in main_cv
 
@@ -145,7 +145,7 @@ CHECK
 	  $x = $x->next
 	 ) {
         # $x->dump if $DEBUG;
-	next unless $x->can('sv');
+	next if (ref($x) ne 'B::SVOP' or !$x->sv->can('PV'));
 	if ($x->sv->PV and $x->sv->PV eq "bad") {
 	  diag "changed 'bad' into 'good'";
 	  $x->sv("good");
@@ -158,8 +158,6 @@ $foo->();
 
 sub foo::baz {
     my $s = "Turn lead into gold in a sub";
-    #$Config::Config{useithreads}
-    #  ? pass( "TODO ".$s ) :
     is( "lead", "gold", $s );
 }
 CHECK
@@ -171,7 +169,6 @@ CHECK
 
     diag "search for const(PV 'lead') in &foo::baz";
     if ($Config::Config{useithreads}) {
-      $DEBUG = 0;
       my $cv = svref_2object(\&foo::baz);
       my @pad = (($cv->PADLIST->ARRAY)[1]->ARRAY); # depth=1?
       $x = $cv->START;
@@ -194,9 +191,10 @@ CHECK
 	  ref($x) ne 'B::NULL';
 	  $x = $x->next
 	 ) {
+        diag ref($x) if $DEBUG;
         # $x->dump if $DEBUG;
-	next unless $x->can('sv') and $x->sv->can('PV');
-	if ($x->sv->PV eq "lead") {
+	next if (ref($x) ne 'B::SVOP' or !$x->sv->can('PV'));
+	if ($x->sv->PV and $x->sv->PV eq "lead") {
 	  diag "changed 'lead' into 'gold'";
 	  $x->sv("gold");
 	  last;
@@ -12,6 +12,8 @@ use_ok 'B';
 # release-dependent values, which we reverify using B-Gen in 2nd test
 
 my %list_nums = (
+    149 => "5.019004",  # added kvaslice, kvhslice
+    148 => "5.017006",  # added padrange
     147 => "5.017004",  # removed boolkeys
     148 => "5.015000",  # added transr and aelemfast_lex, new ops starting with 36
     146 => "5.012000",