This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re-order ops to the implementation order in pp_sys.c - this makes a
authorNicholas Clark <nick@ccl4.org>
Sun, 12 Nov 2006 23:09:46 +0000 (23:09 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 12 Nov 2006 23:09:46 +0000 (23:09 +0000)
branch table corresponding to a switch statement slightly smaller.

p4raw-id: //depot/perl@29251

opcode.h
opcode.pl
opnames.h

index 6789546..de5cc57 100644 (file)
--- a/opcode.h
+++ b/opcode.h
@@ -276,23 +276,23 @@ EXTCONST char* const PL_op_name[] = {
        "ftewrite",
        "fteexec",
        "ftis",
-       "fteowned",
-       "ftrowned",
-       "ftzero",
        "ftsize",
        "ftmtime",
        "ftatime",
        "ftctime",
+       "ftrowned",
+       "fteowned",
+       "ftzero",
        "ftsock",
        "ftchr",
        "ftblk",
        "ftfile",
        "ftdir",
        "ftpipe",
-       "ftlink",
        "ftsuid",
        "ftsgid",
        "ftsvtx",
+       "ftlink",
        "fttty",
        "fttext",
        "ftbinary",
@@ -339,9 +339,9 @@ EXTCONST char* const PL_op_name[] = {
        "msgctl",
        "msgsnd",
        "msgrcv",
+       "semop",
        "semget",
        "semctl",
-       "semop",
        "require",
        "dofile",
        "entereval",
@@ -645,23 +645,23 @@ EXTCONST char* const PL_op_desc[] = {
        "-w",
        "-x",
        "-e",
-       "-o",
-       "-O",
-       "-z",
        "-s",
        "-M",
        "-A",
        "-C",
+       "-O",
+       "-o",
+       "-z",
        "-S",
        "-c",
        "-b",
        "-f",
        "-d",
        "-p",
-       "-l",
        "-u",
        "-g",
        "-k",
+       "-l",
        "-t",
        "-T",
        "-B",
@@ -708,9 +708,9 @@ EXTCONST char* const PL_op_desc[] = {
        "msgctl",
        "msgsnd",
        "msgrcv",
+       "semop",
        "semget",
        "semctl",
-       "semop",
        "require",
        "do \"file\"",
        "eval \"string\"",
@@ -1028,23 +1028,23 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_pp_ftrread),        /* Perl_pp_ftewrite */
        MEMBER_TO_FPTR(Perl_pp_ftrread),        /* Perl_pp_fteexec */
        MEMBER_TO_FPTR(Perl_pp_ftis),
-       MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_fteowned */
-       MEMBER_TO_FPTR(Perl_pp_ftrowned),
-       MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftzero */
        MEMBER_TO_FPTR(Perl_pp_ftis),   /* Perl_pp_ftsize */
        MEMBER_TO_FPTR(Perl_pp_ftis),   /* Perl_pp_ftmtime */
        MEMBER_TO_FPTR(Perl_pp_ftis),   /* Perl_pp_ftatime */
        MEMBER_TO_FPTR(Perl_pp_ftis),   /* Perl_pp_ftctime */
+       MEMBER_TO_FPTR(Perl_pp_ftrowned),
+       MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_fteowned */
+       MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftzero */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftsock */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftchr */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftblk */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftfile */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftdir */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftpipe */
-       MEMBER_TO_FPTR(Perl_pp_ftlink),
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftsuid */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftsgid */
        MEMBER_TO_FPTR(Perl_pp_ftrowned),       /* Perl_pp_ftsvtx */
+       MEMBER_TO_FPTR(Perl_pp_ftlink),
        MEMBER_TO_FPTR(Perl_pp_fttty),
        MEMBER_TO_FPTR(Perl_pp_fttext),
        MEMBER_TO_FPTR(Perl_pp_fttext), /* Perl_pp_ftbinary */
@@ -1091,9 +1091,9 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_pp_semctl), /* Perl_pp_msgctl */
        MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_msgsnd */
        MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_msgrcv */
+       MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_semop */
        MEMBER_TO_FPTR(Perl_pp_semget),
        MEMBER_TO_FPTR(Perl_pp_semctl),
-       MEMBER_TO_FPTR(Perl_pp_shmwrite),       /* Perl_pp_semop */
        MEMBER_TO_FPTR(Perl_pp_require),
        MEMBER_TO_FPTR(Perl_pp_require),        /* Perl_pp_dofile */
        MEMBER_TO_FPTR(Perl_pp_entereval),
@@ -1407,23 +1407,23 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftewrite */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* fteexec */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftis */
-       MEMBER_TO_FPTR(Perl_ck_ftst),   /* fteowned */
-       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftrowned */
-       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftzero */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftsize */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftmtime */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftatime */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftctime */
+       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftrowned */
+       MEMBER_TO_FPTR(Perl_ck_ftst),   /* fteowned */
+       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftzero */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftsock */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftchr */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftblk */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftfile */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftdir */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftpipe */
-       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftlink */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftsuid */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftsgid */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftsvtx */
+       MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftlink */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* fttty */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* fttext */
        MEMBER_TO_FPTR(Perl_ck_ftst),   /* ftbinary */
@@ -1470,9 +1470,9 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* msgctl */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* msgsnd */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* msgrcv */
+       MEMBER_TO_FPTR(Perl_ck_fun),    /* semop */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* semget */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* semctl */
-       MEMBER_TO_FPTR(Perl_ck_fun),    /* semop */
        MEMBER_TO_FPTR(Perl_ck_require),        /* require */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* dofile */
        MEMBER_TO_FPTR(Perl_ck_eval),   /* entereval */
@@ -1781,23 +1781,23 @@ EXTCONST U32 PL_opargs[] = {
        0x0000d894,     /* ftewrite */
        0x0000d894,     /* fteexec */
        0x0000d894,     /* ftis */
-       0x0000d894,     /* fteowned */
-       0x0000d894,     /* ftrowned */
-       0x0000d894,     /* ftzero */
        0x0000d89c,     /* ftsize */
        0x0000d88c,     /* ftmtime */
        0x0000d88c,     /* ftatime */
        0x0000d88c,     /* ftctime */
+       0x0000d894,     /* ftrowned */
+       0x0000d894,     /* fteowned */
+       0x0000d894,     /* ftzero */
        0x0000d894,     /* ftsock */
        0x0000d894,     /* ftchr */
        0x0000d894,     /* ftblk */
        0x0000d894,     /* ftfile */
        0x0000d894,     /* ftdir */
        0x0000d894,     /* ftpipe */
-       0x0000d894,     /* ftlink */
        0x0000d894,     /* ftsuid */
        0x0000d894,     /* ftsgid */
        0x0000d894,     /* ftsvtx */
+       0x0000d894,     /* ftlink */
        0x0000d814,     /* fttty */
        0x0000d894,     /* fttext */
        0x0000d894,     /* ftbinary */
@@ -1844,9 +1844,9 @@ EXTCONST U32 PL_opargs[] = {
        0x0022281d,     /* msgctl */
        0x0022281d,     /* msgsnd */
        0x2222281d,     /* msgrcv */
+       0x0002281d,     /* semop */
        0x0022281d,     /* semget */
        0x0222281d,     /* semctl */
-       0x0002281d,     /* semop */
        0x000136c0,     /* require */
        0x00002240,     /* dofile */
        0x00003640,     /* entereval */
index 6988f88..39e7784 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -885,23 +885,23 @@ fteread           -r                      ck_ftst         isu-    F-
 ftewrite       -w                      ck_ftst         isu-    F-
 fteexec                -x                      ck_ftst         isu-    F-
 ftis           -e                      ck_ftst         isu-    F-
-fteowned       -o                      ck_ftst         isu-    F-
-ftrowned       -O                      ck_ftst         isu-    F-
-ftzero         -z                      ck_ftst         isu-    F-
 ftsize         -s                      ck_ftst         istu-   F-
 ftmtime                -M                      ck_ftst         stu-    F-
 ftatime                -A                      ck_ftst         stu-    F-
 ftctime                -C                      ck_ftst         stu-    F-
+ftrowned       -O                      ck_ftst         isu-    F-
+fteowned       -o                      ck_ftst         isu-    F-
+ftzero         -z                      ck_ftst         isu-    F-
 ftsock         -S                      ck_ftst         isu-    F-
 ftchr          -c                      ck_ftst         isu-    F-
 ftblk          -b                      ck_ftst         isu-    F-
 ftfile         -f                      ck_ftst         isu-    F-
 ftdir          -d                      ck_ftst         isu-    F-
 ftpipe         -p                      ck_ftst         isu-    F-
-ftlink         -l                      ck_ftst         isu-    F-
 ftsuid         -u                      ck_ftst         isu-    F-
 ftsgid         -g                      ck_ftst         isu-    F-
 ftsvtx         -k                      ck_ftst         isu-    F-
+ftlink         -l                      ck_ftst         isu-    F-
 fttty          -t                      ck_ftst         is-     F-
 fttext         -T                      ck_ftst         isu-    F-
 ftbinary       -B                      ck_ftst         isu-    F-
@@ -974,9 +974,9 @@ msgrcv              msgrcv                  ck_fun          imst@   S S S S S
 
 # Semaphores.
 
+semop          semop                   ck_fun          imst@   S S
 semget         semget                  ck_fun          imst@   S S S
 semctl         semctl                  ck_fun          imst@   S S S S
-semop          semop                   ck_fun          imst@   S S
 
 # Eval.
 
index 5b37890..fa521a4 100644 (file)
--- a/opnames.h
+++ b/opnames.h
@@ -258,23 +258,23 @@ typedef enum opcode {
        OP_FTEWRITE,    /* 240 */
        OP_FTEEXEC,     /* 241 */
        OP_FTIS,        /* 242 */
-       OP_FTEOWNED,    /* 243 */
-       OP_FTROWNED,    /* 244 */
-       OP_FTZERO,      /* 245 */
-       OP_FTSIZE,      /* 246 */
-       OP_FTMTIME,     /* 247 */
-       OP_FTATIME,     /* 248 */
-       OP_FTCTIME,     /* 249 */
+       OP_FTSIZE,      /* 243 */
+       OP_FTMTIME,     /* 244 */
+       OP_FTATIME,     /* 245 */
+       OP_FTCTIME,     /* 246 */
+       OP_FTROWNED,    /* 247 */
+       OP_FTEOWNED,    /* 248 */
+       OP_FTZERO,      /* 249 */
        OP_FTSOCK,      /* 250 */
        OP_FTCHR,       /* 251 */
        OP_FTBLK,       /* 252 */
        OP_FTFILE,      /* 253 */
        OP_FTDIR,       /* 254 */
        OP_FTPIPE,      /* 255 */
-       OP_FTLINK,      /* 256 */
-       OP_FTSUID,      /* 257 */
-       OP_FTSGID,      /* 258 */
-       OP_FTSVTX,      /* 259 */
+       OP_FTSUID,      /* 256 */
+       OP_FTSGID,      /* 257 */
+       OP_FTSVTX,      /* 258 */
+       OP_FTLINK,      /* 259 */
        OP_FTTTY,       /* 260 */
        OP_FTTEXT,      /* 261 */
        OP_FTBINARY,    /* 262 */
@@ -321,9 +321,9 @@ typedef enum opcode {
        OP_MSGCTL,      /* 303 */
        OP_MSGSND,      /* 304 */
        OP_MSGRCV,      /* 305 */
-       OP_SEMGET,      /* 306 */
-       OP_SEMCTL,      /* 307 */
-       OP_SEMOP,       /* 308 */
+       OP_SEMOP,       /* 306 */
+       OP_SEMGET,      /* 307 */
+       OP_SEMCTL,      /* 308 */
        OP_REQUIRE,     /* 309 */
        OP_DOFILE,      /* 310 */
        OP_ENTEREVAL,   /* 311 */