Given that we now do the tests in S_visit() to avoid calling the
authorNicholas Clark <nick@ccl4.org>
Thu, 18 Jan 2007 15:48:13 +0000 (15:48 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 18 Jan 2007 15:48:13 +0000 (15:48 +0000)
helper function when skippable, no need to retain those tests
inside the helper functions do_clean_objs() and do_clean_named_objs().

p4raw-id: //depot/perl@29872

sv.c

diff --git a/sv.c b/sv.c
index 9ef3eef..b602dda 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -443,7 +443,8 @@ static void
 do_clean_objs(pTHX_ SV *ref)
 {
     dVAR;
-    if (SvROK(ref)) {
+    assert (SvROK(ref));
+    {
        SV * const target = SvRV(ref);
        if (SvOBJECT(target)) {
            DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning object ref:\n "), sv_dump(ref)));
@@ -469,7 +470,8 @@ static void
 do_clean_named_objs(pTHX_ SV *sv)
 {
     dVAR;
-    if (SvTYPE(sv) == SVt_PVGV && isGV_with_GP(sv) && GvGP(sv)) {
+    assert(SvTYPE(sv) == SVt_PVGV);
+    if (isGV_with_GP(sv) && GvGP(sv)) {
        if ((
 #ifdef PERL_DONT_CREATE_GVSV
             GvSV(sv) &&