B::Concise -- an improved replacement for B::Terse
[p5sagit/p5-mst-13.2.git] / ext / B / B / C.pm
index c8fd96b..dac9417 100644 (file)
@@ -298,7 +298,7 @@ sub B::PADOP::save {
     my ($op, $level) = @_;
     my $sym = objsym($op);
     return $sym if defined $sym;
-    $padopsect->add(sprintf("s\\_%x, s\\_%x, NULL, %u, %u, %u, 0x%x, 0x%x, Nullgv",
+    $padopsect->add(sprintf("s\\_%x, s\\_%x, NULL, %u, %u, %u, 0x%x, 0x%x, 0",
                           ${$op->next}, ${$op->sibling},
                           $op->targ, $op->type, $op_seq, $op->flags,
                           $op->private));
@@ -314,7 +314,7 @@ sub B::COP::save {
     return $sym if defined $sym;
     warn sprintf("COP: line %d file %s\n", $op->line, $op->file)
        if $debug_cops;
-    $copsect->add(sprintf("s\\_%x, s\\_%x, NULL, %u, %u, %u, 0x%x, 0x%x, %s, Nullhv, Nullgv, %u, %d, %u",
+    $copsect->add(sprintf("s\\_%x, s\\_%x, NULL, %u, %u, %u, 0x%x, 0x%x, %s, NULL, NULL, %u, %d, %u",
                          ${$op->next}, ${$op->sibling},
                          $op->targ, $op->type, $op_seq, $op->flags,
                          $op->private, cstring($op->label), $op->cop_seq,
@@ -1020,7 +1020,6 @@ sub output_all {
     print <<"EOT";
 static int $init_name()
 {
-       dTHR;
        dTARG;
        djSP;
 EOT
@@ -1068,7 +1067,7 @@ typedef struct {
     perl_mutex *xcv_mutexp;
     struct perl_thread *xcv_owner;     /* current owner thread */
 #endif /* USE_THREADS */
-    U8         xcv_flags;
+    cv_flags_t xcv_flags;
 } XPVCV_or_similar;
 #define ANYINIT(i) i
 #else
@@ -1090,6 +1089,7 @@ sub output_boilerplate {
     print <<'EOT';
 #include "EXTERN.h"
 #include "perl.h"
+#include "XSUB.h"
 
 /* Workaround for mapstart: the only op which needs a different ppaddr */
 #undef Perl_pp_mapstart
@@ -1337,7 +1337,7 @@ sub should_save
  # Now see if current package looks like an OO class this is probably too strong.
  foreach my $m (qw(new DESTROY TIESCALAR TIEARRAY TIEHASH TIEHANDLE)) 
   {
-   if ($package->can($m)) 
+   if (UNIVERSAL::can($package, $m))
     {
      warn "$package has method $m: saving package\n";#debug
      return mark_package($package);
@@ -1367,7 +1367,7 @@ sub walkpackages
    if ($sym =~ /::$/) 
     {
      $sym = $prefix . $sym;
-     if ($sym ne "main::" && &$recurse($sym)) 
+     if ($sym ne "main::" && $sym ne "<none>::" && &$recurse($sym)) 
       {
        walkpackages(\%glob, $recurse, $sym);
       }