This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_hot.c: skip unnecessary test
[perl5.git] / pp_hot.c
index f9a40fd..6d7b5e2 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -3431,7 +3431,10 @@ PP(pp_entersub)
 
     ENTER;
 
-    while (UNLIKELY(!CvROOT(cv) && !CvXSUB(cv))) {
+    /* these two fields are in a union. If they ever become separate,
+     * we have to test for both of them being null below */
+    assert((void*)&CvROOT(cv) == (void*)&CvXSUB(cv));
+    while (UNLIKELY(!CvROOT(cv))) {
        GV* autogv;
        SV* sub_name;