diff options
author | syber <syber@crazypanda.ru> | 2014-12-01 23:20:27 +0300 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-02 17:56:48 -0800 |
commit | 810bd8b704e337dfba3e46eaea33244c1b0afce3 (patch) | |
tree | 1b45d1d145ccd5b7eecbb14ef57f69da2e5bdb3f /opnames.h | |
parent | 11f9ab1a291e36ad40cb66d0bd0aedce897c06c3 (diff) | |
download | perl-810bd8b704e337dfba3e46eaea33244c1b0afce3.tar.gz |
Speed up method calls like $o->Other::method() and $o->Other::SUPER::method().
It was done by adding new OP_METHOD_REDIR and OP_METHOD_REDIR_SUPER optypes.
Class name to redirect is saved into METHOP as a shared hash string.
Method name is changed (class name removed) an saved into op_meth_sv as
a shared string hash.
So there is no need now to scan for '::' and calculate class and method names
at runtime (in gv_fetchmethod_*) and searching cache HV without precomputed hash.
B::* modules are changed to support new op types.
method_redir is now printed by Concise like (for threaded perl)
$obj->AAA::meth
5 <.> method_redir[PACKAGE "AAA", PV "meth"] ->6
Diffstat (limited to 'opnames.h')
-rw-r--r-- | opnames.h | 366 |
1 files changed, 184 insertions, 182 deletions
@@ -217,191 +217,193 @@ typedef enum opcode { OP_EXIT = 200, OP_METHOD_NAMED = 201, OP_METHOD_SUPER = 202, - OP_ENTERGIVEN = 203, - OP_LEAVEGIVEN = 204, - OP_ENTERWHEN = 205, - OP_LEAVEWHEN = 206, - OP_BREAK = 207, - OP_CONTINUE = 208, - OP_OPEN = 209, - OP_CLOSE = 210, - OP_PIPE_OP = 211, - OP_FILENO = 212, - OP_UMASK = 213, - OP_BINMODE = 214, - OP_TIE = 215, - OP_UNTIE = 216, - OP_TIED = 217, - OP_DBMOPEN = 218, - OP_DBMCLOSE = 219, - OP_SSELECT = 220, - OP_SELECT = 221, - OP_GETC = 222, - OP_READ = 223, - OP_ENTERWRITE = 224, - OP_LEAVEWRITE = 225, - OP_PRTF = 226, - OP_PRINT = 227, - OP_SAY = 228, - OP_SYSOPEN = 229, - OP_SYSSEEK = 230, - OP_SYSREAD = 231, - OP_SYSWRITE = 232, - OP_EOF = 233, - OP_TELL = 234, - OP_SEEK = 235, - OP_TRUNCATE = 236, - OP_FCNTL = 237, - OP_IOCTL = 238, - OP_FLOCK = 239, - OP_SEND = 240, - OP_RECV = 241, - OP_SOCKET = 242, - OP_SOCKPAIR = 243, - OP_BIND = 244, - OP_CONNECT = 245, - OP_LISTEN = 246, - OP_ACCEPT = 247, - OP_SHUTDOWN = 248, - OP_GSOCKOPT = 249, - OP_SSOCKOPT = 250, - OP_GETSOCKNAME = 251, - OP_GETPEERNAME = 252, - OP_LSTAT = 253, - OP_STAT = 254, - OP_FTRREAD = 255, - OP_FTRWRITE = 256, - OP_FTREXEC = 257, - OP_FTEREAD = 258, - OP_FTEWRITE = 259, - OP_FTEEXEC = 260, - OP_FTIS = 261, - OP_FTSIZE = 262, - OP_FTMTIME = 263, - OP_FTATIME = 264, - OP_FTCTIME = 265, - OP_FTROWNED = 266, - OP_FTEOWNED = 267, - OP_FTZERO = 268, - OP_FTSOCK = 269, - OP_FTCHR = 270, - OP_FTBLK = 271, - OP_FTFILE = 272, - OP_FTDIR = 273, - OP_FTPIPE = 274, - OP_FTSUID = 275, - OP_FTSGID = 276, - OP_FTSVTX = 277, - OP_FTLINK = 278, - OP_FTTTY = 279, - OP_FTTEXT = 280, - OP_FTBINARY = 281, - OP_CHDIR = 282, - OP_CHOWN = 283, - OP_CHROOT = 284, - OP_UNLINK = 285, - OP_CHMOD = 286, - OP_UTIME = 287, - OP_RENAME = 288, - OP_LINK = 289, - OP_SYMLINK = 290, - OP_READLINK = 291, - OP_MKDIR = 292, - OP_RMDIR = 293, - OP_OPEN_DIR = 294, - OP_READDIR = 295, - OP_TELLDIR = 296, - OP_SEEKDIR = 297, - OP_REWINDDIR = 298, - OP_CLOSEDIR = 299, - OP_FORK = 300, - OP_WAIT = 301, - OP_WAITPID = 302, - OP_SYSTEM = 303, - OP_EXEC = 304, - OP_KILL = 305, - OP_GETPPID = 306, - OP_GETPGRP = 307, - OP_SETPGRP = 308, - OP_GETPRIORITY = 309, - OP_SETPRIORITY = 310, - OP_TIME = 311, - OP_TMS = 312, - OP_LOCALTIME = 313, - OP_GMTIME = 314, - OP_ALARM = 315, - OP_SLEEP = 316, - OP_SHMGET = 317, - OP_SHMCTL = 318, - OP_SHMREAD = 319, - OP_SHMWRITE = 320, - OP_MSGGET = 321, - OP_MSGCTL = 322, - OP_MSGSND = 323, - OP_MSGRCV = 324, - OP_SEMOP = 325, - OP_SEMGET = 326, - OP_SEMCTL = 327, - OP_REQUIRE = 328, - OP_DOFILE = 329, - OP_HINTSEVAL = 330, - OP_ENTEREVAL = 331, - OP_LEAVEEVAL = 332, - OP_ENTERTRY = 333, - OP_LEAVETRY = 334, - OP_GHBYNAME = 335, - OP_GHBYADDR = 336, - OP_GHOSTENT = 337, - OP_GNBYNAME = 338, - OP_GNBYADDR = 339, - OP_GNETENT = 340, - OP_GPBYNAME = 341, - OP_GPBYNUMBER = 342, - OP_GPROTOENT = 343, - OP_GSBYNAME = 344, - OP_GSBYPORT = 345, - OP_GSERVENT = 346, - OP_SHOSTENT = 347, - OP_SNETENT = 348, - OP_SPROTOENT = 349, - OP_SSERVENT = 350, - OP_EHOSTENT = 351, - OP_ENETENT = 352, - OP_EPROTOENT = 353, - OP_ESERVENT = 354, - OP_GPWNAM = 355, - OP_GPWUID = 356, - OP_GPWENT = 357, - OP_SPWENT = 358, - OP_EPWENT = 359, - OP_GGRNAM = 360, - OP_GGRGID = 361, - OP_GGRENT = 362, - OP_SGRENT = 363, - OP_EGRENT = 364, - OP_GETLOGIN = 365, - OP_SYSCALL = 366, - OP_LOCK = 367, - OP_ONCE = 368, - OP_CUSTOM = 369, - OP_REACH = 370, - OP_RKEYS = 371, - OP_RVALUES = 372, - OP_COREARGS = 373, - OP_RUNCV = 374, - OP_FC = 375, - OP_PADCV = 376, - OP_INTROCV = 377, - OP_CLONECV = 378, - OP_PADRANGE = 379, - OP_REFASSIGN = 380, - OP_LVREF = 381, - OP_LVREFSLICE = 382, - OP_LVAVREF = 383, + OP_METHOD_REDIR = 203, + OP_METHOD_REDIR_SUPER = 204, + OP_ENTERGIVEN = 205, + OP_LEAVEGIVEN = 206, + OP_ENTERWHEN = 207, + OP_LEAVEWHEN = 208, + OP_BREAK = 209, + OP_CONTINUE = 210, + OP_OPEN = 211, + OP_CLOSE = 212, + OP_PIPE_OP = 213, + OP_FILENO = 214, + OP_UMASK = 215, + OP_BINMODE = 216, + OP_TIE = 217, + OP_UNTIE = 218, + OP_TIED = 219, + OP_DBMOPEN = 220, + OP_DBMCLOSE = 221, + OP_SSELECT = 222, + OP_SELECT = 223, + OP_GETC = 224, + OP_READ = 225, + OP_ENTERWRITE = 226, + OP_LEAVEWRITE = 227, + OP_PRTF = 228, + OP_PRINT = 229, + OP_SAY = 230, + OP_SYSOPEN = 231, + OP_SYSSEEK = 232, + OP_SYSREAD = 233, + OP_SYSWRITE = 234, + OP_EOF = 235, + OP_TELL = 236, + OP_SEEK = 237, + OP_TRUNCATE = 238, + OP_FCNTL = 239, + OP_IOCTL = 240, + OP_FLOCK = 241, + OP_SEND = 242, + OP_RECV = 243, + OP_SOCKET = 244, + OP_SOCKPAIR = 245, + OP_BIND = 246, + OP_CONNECT = 247, + OP_LISTEN = 248, + OP_ACCEPT = 249, + OP_SHUTDOWN = 250, + OP_GSOCKOPT = 251, + OP_SSOCKOPT = 252, + OP_GETSOCKNAME = 253, + OP_GETPEERNAME = 254, + OP_LSTAT = 255, + OP_STAT = 256, + OP_FTRREAD = 257, + OP_FTRWRITE = 258, + OP_FTREXEC = 259, + OP_FTEREAD = 260, + OP_FTEWRITE = 261, + OP_FTEEXEC = 262, + OP_FTIS = 263, + OP_FTSIZE = 264, + OP_FTMTIME = 265, + OP_FTATIME = 266, + OP_FTCTIME = 267, + OP_FTROWNED = 268, + OP_FTEOWNED = 269, + OP_FTZERO = 270, + OP_FTSOCK = 271, + OP_FTCHR = 272, + OP_FTBLK = 273, + OP_FTFILE = 274, + OP_FTDIR = 275, + OP_FTPIPE = 276, + OP_FTSUID = 277, + OP_FTSGID = 278, + OP_FTSVTX = 279, + OP_FTLINK = 280, + OP_FTTTY = 281, + OP_FTTEXT = 282, + OP_FTBINARY = 283, + OP_CHDIR = 284, + OP_CHOWN = 285, + OP_CHROOT = 286, + OP_UNLINK = 287, + OP_CHMOD = 288, + OP_UTIME = 289, + OP_RENAME = 290, + OP_LINK = 291, + OP_SYMLINK = 292, + OP_READLINK = 293, + OP_MKDIR = 294, + OP_RMDIR = 295, + OP_OPEN_DIR = 296, + OP_READDIR = 297, + OP_TELLDIR = 298, + OP_SEEKDIR = 299, + OP_REWINDDIR = 300, + OP_CLOSEDIR = 301, + OP_FORK = 302, + OP_WAIT = 303, + OP_WAITPID = 304, + OP_SYSTEM = 305, + OP_EXEC = 306, + OP_KILL = 307, + OP_GETPPID = 308, + OP_GETPGRP = 309, + OP_SETPGRP = 310, + OP_GETPRIORITY = 311, + OP_SETPRIORITY = 312, + OP_TIME = 313, + OP_TMS = 314, + OP_LOCALTIME = 315, + OP_GMTIME = 316, + OP_ALARM = 317, + OP_SLEEP = 318, + OP_SHMGET = 319, + OP_SHMCTL = 320, + OP_SHMREAD = 321, + OP_SHMWRITE = 322, + OP_MSGGET = 323, + OP_MSGCTL = 324, + OP_MSGSND = 325, + OP_MSGRCV = 326, + OP_SEMOP = 327, + OP_SEMGET = 328, + OP_SEMCTL = 329, + OP_REQUIRE = 330, + OP_DOFILE = 331, + OP_HINTSEVAL = 332, + OP_ENTEREVAL = 333, + OP_LEAVEEVAL = 334, + OP_ENTERTRY = 335, + OP_LEAVETRY = 336, + OP_GHBYNAME = 337, + OP_GHBYADDR = 338, + OP_GHOSTENT = 339, + OP_GNBYNAME = 340, + OP_GNBYADDR = 341, + OP_GNETENT = 342, + OP_GPBYNAME = 343, + OP_GPBYNUMBER = 344, + OP_GPROTOENT = 345, + OP_GSBYNAME = 346, + OP_GSBYPORT = 347, + OP_GSERVENT = 348, + OP_SHOSTENT = 349, + OP_SNETENT = 350, + OP_SPROTOENT = 351, + OP_SSERVENT = 352, + OP_EHOSTENT = 353, + OP_ENETENT = 354, + OP_EPROTOENT = 355, + OP_ESERVENT = 356, + OP_GPWNAM = 357, + OP_GPWUID = 358, + OP_GPWENT = 359, + OP_SPWENT = 360, + OP_EPWENT = 361, + OP_GGRNAM = 362, + OP_GGRGID = 363, + OP_GGRENT = 364, + OP_SGRENT = 365, + OP_EGRENT = 366, + OP_GETLOGIN = 367, + OP_SYSCALL = 368, + OP_LOCK = 369, + OP_ONCE = 370, + OP_CUSTOM = 371, + OP_REACH = 372, + OP_RKEYS = 373, + OP_RVALUES = 374, + OP_COREARGS = 375, + OP_RUNCV = 376, + OP_FC = 377, + OP_PADCV = 378, + OP_INTROCV = 379, + OP_CLONECV = 380, + OP_PADRANGE = 381, + OP_REFASSIGN = 382, + OP_LVREF = 383, + OP_LVREFSLICE = 384, + OP_LVAVREF = 385, OP_max } opcode; -#define MAXO 384 +#define MAXO 386 #define OP_FREED MAXO /* the OP_IS_* macros are optimized to a simple range check because |