Change 31333 by [EMAIL PROTECTED] on 2007/06/05 10:10:33

        Remove support for assertions and -A

Affected files ...

... //depot/perl/MANIFEST#1580 edit
... //depot/perl/cv.h#72 edit
... //depot/perl/dump.c#266 edit
... //depot/perl/ext/B/B.xs#137 edit
... //depot/perl/ext/B/B/Concise.pm#69 edit
... //depot/perl/ext/B/B/Deparse.pm#180 edit
... //depot/perl/ext/B/defsubs_h.PL#31 edit
... //depot/perl/ext/B/t/concise-xs.t#35 edit
... //depot/perl/lib/assertions.pm#11 delete
... //depot/perl/lib/assertions/activate.pm#10 delete
... //depot/perl/lib/assertions/compat.pm#3 delete
... //depot/perl/lib/perl5db.pl#129 edit
... //depot/perl/op.c#943 edit
... //depot/perl/perl.c#813 edit
... //depot/perl/perl.h#782 edit
... //depot/perl/pod/perl.pod#126 edit
... //depot/perl/pod/perldiag.pod#472 edit
... //depot/perl/pod/perllexwarn.pod#30 edit
... //depot/perl/pod/perlrun.pod#153 edit
... //depot/perl/pod/perltodo.pod#179 edit
... //depot/perl/pp_hot.c#521 edit
... //depot/perl/sv.c#1409 edit
... //depot/perl/t/comp/assertions.t#6 delete
... //depot/perl/t/comp/asstcompat.t#3 delete
... //depot/perl/t/op/attrs.t#18 edit
... //depot/perl/t/run/switch_A.t#6 delete
... //depot/perl/toke.c#785 edit
... //depot/perl/warnings.pl#59 edit
... //depot/perl/xsutils.c#52 edit

Differences ...

==== //depot/perl/MANIFEST#1580 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1579~31332~   2007-06-04 01:04:13.000000000 -0700
+++ perl/MANIFEST       2007-06-05 03:10:33.000000000 -0700
@@ -1421,9 +1421,6 @@
 lib/Archive/Tar/t/src/short/b  Archive::Tar tests
 lib/Archive/Tar/t/src/short/bar.tar.packed     Archive::Tar tests
 lib/Archive/Tar/t/src/short/foo.tgz.packed     Archive::Tar tests
-lib/assertions/activate.pm     assertions activate/deactivate
-lib/assertions/compat.pm       assertions compatibility for earlier perls
-lib/assertions.pm              module support for -A flag
 lib/assert.pl                  assertion and panic with stack trace
 lib/Attribute/Handlers/Changes Attribute::Handlers
 lib/Attribute/Handlers/demo/demo2.pl   Attribute::Handlers demo
@@ -3368,8 +3365,6 @@
 t/cmd/subval.t                 See if subroutine values work
 t/cmd/switch.t                 See if switch optimizations work
 t/cmd/while.t                  See if while loops work
-t/comp/assertions.t            See if assertions work
-t/comp/asstcompat.t            See if assertions::compat work
 t/comp/bproto.t                        See if builtins conform to their 
prototypes
 t/comp/cmdopt.t                        See if command optimization works
 t/comp/colon.t                 See if colons are parsed correctly
@@ -3861,7 +3856,6 @@
 t/run/runenv.t                 Test if perl honors its environment variables.
 t/run/switch0.t                        Test the -0 switch
 t/run/switcha.t                        Test the -a switch
-t/run/switch_A.t               Test the -A switch
 t/run/switchC.t                        Test the -C switch
 t/run/switchd.t                        Test the -d switch
 t/run/switches.t               Tests for the other switches (-0, -l, -c, -s, 
-M, -m, -V, -v, -h, -z, -i)

==== //depot/perl/cv.h#72 (text) ====
Index: perl/cv.h
--- perl/cv.h#71~29670~ 2007-01-02 13:45:08.000000000 -0800
+++ perl/cv.h   2007-06-05 03:10:33.000000000 -0700
@@ -139,7 +139,6 @@
 #define CVf_METHOD     0x0001  /* CV is explicitly marked as a method */
 #define CVf_LOCKED     0x0002  /* CV locks itself or first arg on entry */
 #define CVf_LVALUE     0x0004  /* CV return value can be used as lvalue */
-#define CVf_ASSERTION   0x0008  /* CV called only when asserting */
 
 #define CVf_WEAKOUTSIDE        0x0010  /* CvOUTSIDE isn't ref counted */
 #define CVf_CLONE      0x0020  /* anon CV uses external lexicals */
@@ -153,7 +152,7 @@
 #define CVf_ISXSUB     0x0800  /* CV is an XSUB, not pure perl.  */
 
 /* This symbol for optimised communication between toke.c and op.c: */
-#define CVf_BUILTIN_ATTRS      (CVf_METHOD|CVf_LOCKED|CVf_LVALUE|CVf_ASSERTION)
+#define CVf_BUILTIN_ATTRS      (CVf_METHOD|CVf_LOCKED|CVf_LVALUE)
 
 #define CvCLONE(cv)            (CvFLAGS(cv) & CVf_CLONE)
 #define CvCLONE_on(cv)         (CvFLAGS(cv) |= CVf_CLONE)
@@ -187,10 +186,6 @@
 #define CvLVALUE_on(cv)                (CvFLAGS(cv) |= CVf_LVALUE)
 #define CvLVALUE_off(cv)       (CvFLAGS(cv) &= ~CVf_LVALUE)
 
-#define CvASSERTION(cv)                (CvFLAGS(cv) & CVf_ASSERTION)
-#define CvASSERTION_on(cv)     (CvFLAGS(cv) |= CVf_ASSERTION)
-#define CvASSERTION_off(cv)    (CvFLAGS(cv) &= ~CVf_ASSERTION)
-
 #define CvEVAL(cv)             (CvUNIQUE(cv) && !SvFAKE(cv))
 #define CvEVAL_on(cv)          (CvUNIQUE_on(cv),SvFAKE_off(cv))
 #define CvEVAL_off(cv)         CvUNIQUE_off(cv)

==== //depot/perl/dump.c#266 (text) ====
Index: perl/dump.c
--- perl/dump.c#265~31270~      2007-05-25 00:46:08.000000000 -0700
+++ perl/dump.c 2007-06-05 03:10:33.000000000 -0700
@@ -1437,7 +1437,6 @@
        if (CvMETHOD(sv))       sv_catpv(d, "METHOD,");
        if (CvLOCKED(sv))       sv_catpv(d, "LOCKED,");
        if (CvWEAKOUTSIDE(sv))  sv_catpv(d, "WEAKOUTSIDE,");
-       if (CvASSERTION(sv))    sv_catpv(d, "ASSERTION,");
        break;
     case SVt_PVHV:
        if (HvSHAREKEYS(sv))    sv_catpv(d, "SHAREKEYS,");

==== //depot/perl/ext/B/B.xs#137 (text) ====
Index: perl/ext/B/B.xs
--- perl/ext/B/B.xs#136~31153~  2007-05-05 10:35:22.000000000 -0700
+++ perl/ext/B/B.xs     2007-06-05 03:10:33.000000000 -0700
@@ -597,7 +597,6 @@
     specialsv_list[5] = (SV *) pWARN_NONE;
     specialsv_list[6] = (SV *) pWARN_STD;
 #if PERL_VERSION <= 8
-#  define CVf_ASSERTION        0
 #  define OPpPAD_STATE 0
 #endif
 #include "defsubs.h"

==== //depot/perl/ext/B/B/Concise.pm#69 (text) ====
Index: perl/ext/B/B/Concise.pm
--- perl/ext/B/B/Concise.pm#68~31294~   2007-05-28 06:36:43.000000000 -0700
+++ perl/ext/B/B/Concise.pm     2007-06-05 03:10:33.000000000 -0700
@@ -634,8 +634,8 @@
 @hints{4096,8192,16384,32768,65536} = ('I', 'F', 'B', 'S', 'R');
 # taint and eval
 @hints{1048576,2097152} = ('T', 'E');
-# filetest access, UTF-8, assertions, assertions seen
[EMAIL PROTECTED],8388608,16777216,33554432} = ('X', 'U', 'A', 'a');
+# filetest access, UTF-8
[EMAIL PROTECTED],8388608} = ('X', 'U');
 
 sub _flags {
     my($hash, $x) = @_;

==== //depot/perl/ext/B/B/Deparse.pm#180 (text) ====
Index: perl/ext/B/B/Deparse.pm
--- perl/ext/B/B/Deparse.pm#179~31268~  2007-05-24 09:12:58.000000000 -0700
+++ perl/ext/B/B/Deparse.pm     2007-06-05 03:10:33.000000000 -0700
@@ -17,7 +17,7 @@
         OPpCONST_ARYBASE OPpEXISTS_SUB OPpSORT_NUMERIC OPpSORT_INTEGER
         OPpSORT_REVERSE OPpSORT_INPLACE OPpSORT_DESCEND OPpITER_REVERSED
         SVf_IOK SVf_NOK SVf_ROK SVf_POK SVpad_OUR SVf_FAKE SVs_RMG SVs_SMG
-         CVf_METHOD CVf_LOCKED CVf_LVALUE CVf_ASSERTION
+         CVf_METHOD CVf_LOCKED CVf_LVALUE
         PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE
         PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
         ($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE');
@@ -144,8 +144,6 @@
 # - here-docs?
 
 # Current test.deparse failures
-# comp/assertions 38 - disabled assertions should be like "my($x) if 0"
-#    'sub f : assertion {}; no assertions; my $x=1; {f(my $x=2); print "$x\n"}'
 # comp/hints 6 - location of BEGIN blocks wrt. block openings
 # run/switchI 1 - missing -I switches entirely
 #    perl -Ifoo -e 'print @INC'
@@ -839,12 +837,11 @@
     if ($cv->FLAGS & SVf_POK) {
        $proto = "(". $cv->PV . ") ";
     }
-    if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE|CVf_ASSERTION)) {
+    if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE)) {
         $proto .= ": ";
         $proto .= "lvalue " if $cv->CvFLAGS & CVf_LVALUE;
         $proto .= "locked " if $cv->CvFLAGS & CVf_LOCKED;
         $proto .= "method " if $cv->CvFLAGS & CVf_METHOD;
-        $proto .= "assertion " if $cv->CvFLAGS & CVf_ASSERTION;
     }
 
     local($self->{'curcv'}) = $cv;

==== //depot/perl/ext/B/defsubs_h.PL#31 (text) ====
Index: perl/ext/B/defsubs_h.PL
--- perl/ext/B/defsubs_h.PL#30~30841~   2007-04-04 01:32:37.000000000 -0700
+++ perl/ext/B/defsubs_h.PL     2007-06-05 03:10:33.000000000 -0700
@@ -15,7 +15,6 @@
 
 foreach my $const (qw(
                      CVf_ANON
-                     CVf_ASSERTION
                      CVf_CLONE
                      CVf_CLONED
                      CVf_CONST

==== //depot/perl/ext/B/t/concise-xs.t#35 (text) ====
Index: perl/ext/B/t/concise-xs.t
--- perl/ext/B/t/concise-xs.t#34~31153~ 2007-05-05 10:35:22.000000000 -0700
+++ perl/ext/B/t/concise-xs.t   2007-06-05 03:10:33.000000000 -0700
@@ -119,9 +119,7 @@
                          40 + 16       # Data::Dumper, Digest::MD5
                          + 517 + 262   # B::Deparse, B
                          + 595 + 190   # POSIX, IO::Socket
-                         + 345 * ($] > 5.009)
-                         + 17 * ($] >= 5.009003)
-                         - 366);       # fudge
+                         - 6);         # fudge
 
 require_ok("B::Concise");
 
@@ -165,7 +163,7 @@
        XS => [qw( svref_2object perlstring opnumber main_start
                   main_root main_cv )],
 
-       constant => [qw/ ASSIGN CVf_ASSERTION CVf_LOCKED CVf_LVALUE
+       constant => [qw/ ASSIGN CVf_LOCKED CVf_LVALUE
                     CVf_METHOD LIST_CONTEXT OP_CONST OP_LIST OP_RV2SV
                     OP_STRINGIFY OPf_KIDS OPf_MOD OPf_REF OPf_SPECIAL
                     OPf_STACKED OPf_WANT OPf_WANT_LIST OPf_WANT_SCALAR

==== //depot/perl/lib/perl5db.pl#129 (text) ====
Index: perl/lib/perl5db.pl
--- perl/lib/perl5db.pl#128~30515~      2007-03-08 05:49:42.000000000 -0800
+++ perl/lib/perl5db.pl 2007-06-05 03:10:33.000000000 -0700
@@ -967,15 +967,6 @@
     $^W       = 0;
 }    # Switch compilation warnings off until another BEGIN.
 
-# test if assertions are supported and actived:
-BEGIN {
-    $ini_assertion = eval "sub asserting_test : assertion {1}; 1";
-
-    # $ini_assertion = undef => assertions unsupported,
-    #        "       = 1     => assertions supported
-    # print "\$ini_assertion=$ini_assertion\n";
-}
-
 local ($^W) = 0;    # Switch run-time warnings off during init.
 
 =head2 THREADS SUPPORT
@@ -1102,10 +1093,10 @@
   signalLevel  warnLevel     dieLevel
   inhibit_exit ImmediateStop bareStringify
   CreateTTY    RemotePort    windowSize
-  DollarCaretP OnlyAssertions WarnAssertions
+  DollarCaretP
 );
 
[EMAIL PROTECTED] = qw(DollarCaretP OnlyAssertions);
[EMAIL PROTECTED] = qw(DollarCaretP);
 
 =pod
 
@@ -1134,7 +1125,6 @@
     ImmediateStop => \$ImmediateStop,
     RemotePort    => \$remoteport,
     windowSize    => \$window,
-    WarnAssertions => \$warnassertions,
     HistFile      => \$histfile,
     HistSize      => \$histsize,
 );
@@ -1165,7 +1155,6 @@
     ornaments     => \&ornaments,
     RemotePort    => \&RemotePort,
     DollarCaretP  => \&DollarCaretP,
-    OnlyAssertions=> \&OnlyAssertions,
 );
 
 =pod
@@ -3697,17 +3686,7 @@
         # Called in array context. call sub and capture output.
         # DB::DB will recursively get control again if appropriate; we'll come
         # back here when the sub is finished.
-        if ($assertion) {
-            $assertion = 0;
-            eval { @ret = &$sub; };
-            if ($@) {
-                print $OUT $@;
-                $signal = 1 unless $warnassertions;
-            }
-        }
-        else {
-            @ret = &$sub;
-        }
+       @ret = &$sub;
 
         # Pop the single-step value back off the stack.
         $single |= $stack[ $stack_depth-- ];
@@ -3748,32 +3727,17 @@
 
     # Scalar context.
     else {
-        if ($assertion) {
-            $assertion = 0;
-            eval {
-
-                # Save the value if it's wanted at all.
-                $ret = &$sub;
-            };
-            if ($@) {
-                print $OUT $@;
-                $signal = 1 unless $warnassertions;
-            }
-            $ret = undef unless defined wantarray;
-        }
-        else {
-            if ( defined wantarray ) {
+       if ( defined wantarray ) {
 
-                # Save the value if it's wanted at all.
-                $ret = &$sub;
-            }
-            else {
+           # Save the value if it's wanted at all.
+           $ret = &$sub;
+       }
+       else {
 
-                # Void return, explicitly.
-                &$sub;
-                undef $ret;
-            }
-        }    # if assertion
+           # Void return, explicitly.
+           &$sub;
+           undef $ret;
+       }
 
         # Pop the single-step value off the stack.
         $single |= $stack[ $stack_depth-- ];
@@ -5343,38 +5307,6 @@
 These are general support routines that are used in a number of places
 throughout the debugger.
 
-=over 4
-
-=item cmd_P
-
-Something to do with assertions
-
-=back
-
-=cut
-
-sub cmd_P {
-    unless ($ini_assertion) {
-        print $OUT "Assertions not supported in this Perl interpreter\n";
-    } else {
-        if ( $cmd =~ /^.\b\s*([+-]?)\s*(~?)\s*(\w+(\s*\|\s*\w+)*)\s*$/ ) {
-            my ( $how, $neg, $flags ) = ( $1, $2, $3 );
-            my $acu = parse_DollarCaretP_flags($flags);
-            if ( defined $acu ) {
-                $acu = ~$acu if $neg;
-                if ( $how eq '+' ) { $^P |= $acu }
-                elsif ( $how eq '-' ) { $^P &= ~$acu }
-                else { $^P = $acu }
-            }
-
-            # else { print $OUT "undefined acu\n" }
-        }
-        my $expanded = expand_DollarCaretP_flags($^P);
-        print $OUT "Internal Perl debugger flags:\n\$^P=$expanded\n";
-        $expanded;
-    }
-}
-
 =head2 save
 
 save() saves the user's versions of globals that would mess us up in C<@saved>,
@@ -6946,33 +6878,6 @@
     expand_DollarCaretP_flags($^P);
 }
 
-sub OnlyAssertions {
-    if ($term) {
-        &warn("Too late to set up OnlyAssertions mode, enabled on next 'R'!\n")
-          if @_;
-    }
-    if (@_) {
-        unless ( defined $ini_assertion ) {
-            if ($term) {
-                &warn("Current Perl interpreter doesn't support assertions");
-            }
-            return 0;
-        }
-        if (shift) {
-            unless ($ini_assertion) {
-                print "Assertions will be active on next 'R'!\n";
-                $ini_assertion = 1;
-            }
-            $^P &= ~$DollarCaretP_flags{PERLDBf_SUB};
-            $^P |= $DollarCaretP_flags{PERLDBf_ASSERTION};
-        }
-        else {
-            $^P |= $DollarCaretP_flags{PERLDBf_SUB};
-        }
-    }
-    !( $^P & $DollarCaretP_flags{PERLDBf_SUB} ) || 0;
-}
-
 =head2 C<pager>
 
 Set up the C<$pager> variable. Adds a pipe to the front unless there's one
@@ -7235,7 +7140,6 @@
 B<e>         Display current thread id.
 B<E>         Display all thread ids the current one will be identified: <n>.
 B<y> [I<n> [I<Vars>]]   List lexicals in higher scope <n>.  Vars same as B<V>.
-B<P> Something to do with assertions...
 
 B<<> ?            List Perl commands to run before each prompt.
 B<<> I<expr>        Define Perl command to run before each prompt.
@@ -8762,8 +8666,7 @@
         PERLDBf_GOTO      => 0x80,     # Report goto: call DB::goto
         PERLDBf_NAMEEVAL  => 0x100,    # Informative names for evals
         PERLDBf_NAMEANON  => 0x200,    # Informative names for anon subs
-        PERLDBf_ASSERTION => 0x400,    # Debug assertion subs enter/exit
-        PERLDB_ALL        => 0x33f,    # No _NONAME, _GOTO, _ASSERTION
+        PERLDB_ALL        => 0x33f,    # No _NONAME, _GOTO
     );
 
     %DollarCaretP_flags_r = reverse %DollarCaretP_flags;
@@ -8869,11 +8772,6 @@
 
     # If warn was on before, turn it on again.
     push @flags, '-w' if $ini_warn;
-    if ( $ini_assertion and @{^ASSERTING} ) {
-        push @flags,
-          ( map { /\:\^\(\?\:(.*)\)\$\)/ ? "-A$1" : "-A$_" }
-              @{^ASSERTING} );
-    }
 
     # Rebuild the -I flags that were on the initial
     # command line.

==== //depot/perl/op.c#943 (text) ====
Index: perl/op.c
--- perl/op.c#942~31255~        2007-05-21 15:35:15.000000000 -0700
+++ perl/op.c   2007-06-05 03:10:33.000000000 -0700
@@ -7507,26 +7507,6 @@
                    proto = SvPV((SV*)cv, len);
                    proto_end = proto + len;
                }
-               if (CvASSERTION(cv)) {
-                   U32 asserthints = 0;
-                   HV *const hinthv = GvHV(PL_hintgv);
-                   if (hinthv) {
-                       SV **svp = hv_fetchs(hinthv, "assertions", FALSE);
-                       if (svp && *svp)
-                           asserthints = SvUV(*svp);
-                   }
-                   if (asserthints & HINT_ASSERTING) {
-                       if (PERLDB_ASSERTION && PL_curstash != PL_debstash)
-                           o->op_private |= OPpENTERSUB_DB;
-                   }
-                   else {
-                       delete_op = 1;
-                       if (!(asserthints & HINT_ASSERTIONSSEEN) && 
ckWARN(WARN_ASSERTIONS)) {
-                           Perl_warner(aTHX_ packWARN(WARN_ASSERTIONS),
-                                       "Impossible to activate assertion 
call");
-                       }
-                   }
-               }
            }
        }
     }

==== //depot/perl/perl.c#813 (text) ====
Index: perl/perl.c
--- perl/perl.c#812~31255~      2007-05-21 15:35:15.000000000 -0700
+++ perl/perl.c 2007-06-05 03:10:33.000000000 -0700
@@ -971,7 +971,6 @@
     PL_DBsingle = NULL;
     PL_DBtrace = NULL;
     PL_DBsignal = NULL;
-    PL_DBassertion = NULL;
     PL_DBcv = NULL;
     PL_dbargs = NULL;
     PL_debstash = NULL;
@@ -1716,7 +1715,6 @@
        case 'W':
        case 'X':
        case 'w':
-       case 'A':
            if ((s = moreswitches(s)))
                goto reswitch;
            break;
@@ -2908,7 +2906,6 @@
 
     static const char * const usage_msg[] = {
 "-0[octal]         specify record separator (\\0, if no argument)",
-"-A[mod][=pattern] activate all/given assertions",
 "-a                autosplit mode with -n or -p (splits $_ into @F)",
 "-C[number/list]   enables the listed Unicode features",
 "-c                check syntax only (runs BEGIN and CHECK blocks)",
@@ -3206,27 +3203,6 @@
            }
        }
        return s;
-    case 'A':
-       forbid_setid('A', -1);
-       s++;
-       {
-           char * const start = s;
-           SV * const sv = newSVpvs("use assertions::activate");
-           while(isALNUM(*s) || *s == ':') ++s;
-           if (s != start) {
-               sv_catpvs(sv, "::");
-               sv_catpvn(sv, start, s-start);
-           }
-           if (*s == '=') {
-               Perl_sv_catpvf(aTHX_ sv, " split(/,/,q%c%s%c)", 0, ++s, 0);
-               s+=strlen(s);
-           }
-           else if (*s != '\0') {
-               Perl_croak(aTHX_ "Can't use '%c' after -A%.*s", *s, 
(int)(s-start), start);
-           }
-           Perl_av_create_and_push(aTHX_ &PL_preambleav, sv);
-           return s;
-       }
     case 'M':
        forbid_setid('M', -1);  /* XXX ? */
        /* FALL THROUGH */
@@ -4500,8 +4476,6 @@
     sv_setiv(PL_DBtrace, 0);
     PL_DBsignal = GvSV((gv_fetchpvs("DB::signal", GV_ADDMULTI, SVt_PV)));
     sv_setiv(PL_DBsignal, 0);
-    PL_DBassertion = GvSV((gv_fetchpvs("DB::assertion", GV_ADDMULTI, SVt_PV)));
-    sv_setiv(PL_DBassertion, 0);
     PL_curstash = ostash;
 }
 

==== //depot/perl/perl.h#782 (text) ====
Index: perl/perl.h
--- perl/perl.h#781~31245~      2007-05-20 16:10:15.000000000 -0700
+++ perl/perl.h 2007-06-05 03:10:33.000000000 -0700
@@ -4395,10 +4395,6 @@
 #define HINT_FILETEST_ACCESS   0x00400000 /* filetest pragma */
 #define HINT_UTF8              0x00800000 /* utf8 pragma */
 
-/* assertions pragma, stored in $^H{assertions} */
-#define HINT_ASSERTING          0x00000001
-#define HINT_ASSERTIONSSEEN     0x00000002
-
 /* The following are stored in $^H{sort}, not in PL_hints */
 #define HINT_SORT_SORT_BITS    0x000000FF /* allow 256 different ones */
 #define HINT_SORT_QUICKSORT    0x00000001
@@ -5099,7 +5095,6 @@
 #define PERLDBf_GOTO           0x80    /* Report goto: call DB::goto */
 #define PERLDBf_NAMEEVAL       0x100   /* Informative names for evals */
 #define PERLDBf_NAMEANON       0x200   /* Informative names for anon subs */
-#define PERLDBf_ASSERTION       0x400   /* Debug assertion subs enter/exit */
 
 #define PERLDB_SUB     (PL_perldb && (PL_perldb & PERLDBf_SUB))
 #define PERLDB_LINE    (PL_perldb && (PL_perldb & PERLDBf_LINE))

==== //depot/perl/pod/perl.pod#126 (text) ====
Index: perl/pod/perl.pod
--- perl/pod/perl.pod#125~31110~        2007-04-30 08:34:29.000000000 -0700
+++ perl/pod/perl.pod   2007-06-05 03:10:33.000000000 -0700
@@ -9,7 +9,6 @@
        S<[ B<-cw> ] [ B<-d>[B<t>][:I<debugger>] ] [ B<-D>[I<number/list>] ]>
        S<[ B<-pna> ] [ B<-F>I<pattern> ] [ B<-l>[I<octal>] ] [ 
B<-0>[I<octal/hexadecimal>] ]>
        S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> 
] [ B<-f> ]>
-       S<[ B<-A>[I<module>][=I<assertions>] ]>
        S<[ B<-C [I<number/list>] >]>
        S<[ B<-P> ]>
        S<[ B<-S> ]>

==== //depot/perl/pod/perldiag.pod#472 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod#471~31116~    2007-05-02 05:17:22.000000000 -0700
+++ perl/pod/perldiag.pod       2007-06-05 03:10:33.000000000 -0700
@@ -1967,11 +1967,6 @@
 didn't see the expected delimiter between key and value, so the line was
 ignored.
 
-=item Impossible to activate assertion call
-
-(W assertions) You're calling an assertion function in a block that is
-not under the control of the C<assertions> pragma.
-
 =item (in cleanup) %s
 
 (W misc) This prefix usually indicates that a DESTROY() method raised

==== //depot/perl/pod/perllexwarn.pod#30 (text) ====
Index: perl/pod/perllexwarn.pod
--- perl/pod/perllexwarn.pod#29~28778~  2006-09-04 05:41:39.000000000 -0700
+++ perl/pod/perllexwarn.pod    2007-06-05 03:10:33.000000000 -0700
@@ -212,8 +212,6 @@
 
   all -+
        |
-       +- assertions
-       |
        +- closure
        |
        +- deprecated

==== //depot/perl/pod/perlrun.pod#153 (text) ====
Index: perl/pod/perlrun.pod
--- perl/pod/perlrun.pod#152~30648~     2007-03-20 04:39:16.000000000 -0700
+++ perl/pod/perlrun.pod        2007-06-05 03:10:33.000000000 -0700
@@ -9,7 +9,6 @@
        S<[ B<-cw> ] [ B<-d>[B<t>][:I<debugger>] ] [ B<-D>[I<number/list>] ]>
        S<[ B<-pna> ] [ B<-F>I<pattern> ] [ B<-l>[I<octal>] ] [ 
B<-0>[I<octal/hexadecimal>] ]>
        S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> 
] [ B<-f> ]>
-       S<[ B<-A>[I<module>][=I<assertions>] ]>
        S<[ B<-C [I<number/list>] >]>
        S<[ B<-P> ]>
        S<[ B<-S> ]>
@@ -260,19 +259,6 @@
 (This means that you cannot use the C<-x> with a directory name that
 consists of hexadecimal digits.)
 
-=item B<-A[I<module>][=I<assertions>]>
-X<-A>
-
-Activates the assertions given after the equal sign as a comma-separated
-list of assertion names or regular expressions. If no assertion name
-is given, activates all assertions.
-
-The module L<assertions::activate> is used by default to activate the
-selected assertions. An alternate module may be specified including
-its name between the switch and the equal sign.
-
-See L<assertions> and L<assertions::activate>.
-
 =item B<-a>
 X<-a> X<autosplit>
 

==== //depot/perl/pod/perltodo.pod#179 (text) ====
Index: perl/pod/perltodo.pod
--- perl/pod/perltodo.pod#178~31297~    2007-05-28 23:12:06.000000000 -0700
+++ perl/pod/perltodo.pod       2007-06-05 03:10:33.000000000 -0700
@@ -603,15 +603,6 @@
 
 The old perltodo notes "Look at the "reification" code in C<av.c>".
 
-=head2 What hooks would assertions need?
-
-Assertions are in the core, and work. However, assertions needed to be added
-as a core patch, rather than an XS module in ext, or a CPAN module, because
-the core has no hooks in the necessary places. It would be useful to
-investigate what hooks would need to be added to make it possible to provide
-the full assertion support from a CPAN module, so that we aren't constraining
-the imagination of future CPAN authors.
-
 =head2 Properly Unicode safe tokeniser and pads.
 
 The tokeniser isn't actually very UTF-8 clean. C<use utf8;> is a hack -

==== //depot/perl/pp_hot.c#521 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#520~31122~    2007-05-03 02:24:47.000000000 -0700
+++ perl/pp_hot.c       2007-06-05 03:10:33.000000000 -0700
@@ -2710,9 +2710,6 @@
 
     gimme = GIMME_V;
     if ((PL_op->op_private & OPpENTERSUB_DB) && GvCV(PL_DBsub) && 
!CvNODEBUG(cv)) {
-        if (CvASSERTION(cv) && PL_DBassertion)
-           sv_setiv(PL_DBassertion, 1);
-       
         Perl_get_db_sub(aTHX_ &sv, cv);
         if (CvISXSUB(cv))
             PL_curcopdb = PL_curcop;

==== //depot/perl/sv.c#1409 (text) ====
Index: perl/sv.c
--- perl/sv.c#1408~31295~       2007-05-28 11:50:23.000000000 -0700
+++ perl/sv.c   2007-06-05 03:10:33.000000000 -0700
@@ -11137,7 +11137,6 @@
     PL_DBsingle                = sv_dup(proto_perl->IDBsingle, param);
     PL_DBtrace         = sv_dup(proto_perl->IDBtrace, param);
     PL_DBsignal                = sv_dup(proto_perl->IDBsignal, param);
-    PL_DBassertion      = sv_dup(proto_perl->IDBassertion, param);
     PL_dbargs          = av_dup(proto_perl->Idbargs, param);
 
     /* symbol tables */

==== //depot/perl/t/op/attrs.t#18 (text) ====
Index: perl/t/op/attrs.t
--- perl/t/op/attrs.t#17~29330~ 2006-11-20 10:03:43.000000000 -0800
+++ perl/t/op/attrs.t   2007-06-05 03:10:33.000000000 -0700
@@ -159,7 +159,6 @@
 
 
 my @code = qw(lvalue locked method);
-unshift @code, 'assertion' if $] >= 5.009;
 my @other = qw(shared unique);
 my %valid;
 $valid{CODE} = {map {$_ => 1} @code};

==== //depot/perl/toke.c#785 (text) ====
Index: perl/toke.c
--- perl/toke.c#784~31255~      2007-05-21 15:35:15.000000000 -0700
+++ perl/toke.c 2007-06-05 03:10:33.000000000 -0700
@@ -4296,10 +4296,6 @@
                        sv_free(sv);
                        CvMETHOD_on(PL_compcv);
                    }
-                   else if (!PL_in_my && len == 9 && strnEQ(SvPVX(sv), 
"assertion", len)) {
-                       sv_free(sv);
-                       CvASSERTION_on(PL_compcv);
-                   }
                    /* After we've set the flags, it could be argued that
                       we don't need to do the attributes.pm-based setting
                       process, and shouldn't bother appending recognized

==== //depot/perl/warnings.pl#59 (text) ====
Index: perl/warnings.pl
--- perl/warnings.pl#58~31084~  2007-04-26 05:47:57.000000000 -0700
+++ perl/warnings.pl    2007-06-05 03:10:33.000000000 -0700
@@ -61,7 +61,6 @@
                'pack'          => [ 5.008, DEFAULT_OFF],
                'unpack'        => [ 5.008, DEFAULT_OFF],
                'threads'       => [ 5.008, DEFAULT_OFF],
-       'assertions'    => [ 5.009, DEFAULT_OFF],
 
                 #'default'     => [ 5.008, DEFAULT_ON ],
        }],

==== //depot/perl/xsutils.c#52 (text) ====
Index: perl/xsutils.c
--- perl/xsutils.c#51~30447~    2007-03-03 01:34:23.000000000 -0800
+++ perl/xsutils.c      2007-06-05 03:10:33.000000000 -0700
@@ -71,17 +71,6 @@
        switch (SvTYPE(sv)) {
        case SVt_PVCV:
            switch ((int)len) {
-#ifdef CVf_ASSERTION
-           case 9:
-               if (memEQ(name, "assertion", 9)) {
-                   if (negated)
-                       CvFLAGS((CV*)sv) &= ~CVf_ASSERTION;
-                   else
-                       CvFLAGS((CV*)sv) |= CVf_ASSERTION;
-                   continue;
-               }
-               break;
-#endif
            case 6:
                switch (name[3]) {
 #ifdef CVf_LVALUE
@@ -230,8 +219,6 @@
            XPUSHs(sv_2mortal(newSVpvs("method")));
         if (GvUNIQUE(CvGV((CV*)sv)))
            XPUSHs(sv_2mortal(newSVpvs("unique")));
-       if (cvflags & CVf_ASSERTION)
-           XPUSHs(sv_2mortal(newSVpvs("assertion")));
        break;
     case SVt_PVGV:
        if (GvUNIQUE(sv))
End of Patch.

Reply via email to