summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorsyber <syber@crazypanda.ru>2014-09-04 22:08:59 +0400
committerDavid Mitchell <davem@iabyn.com>2014-10-03 13:40:54 +0100
commitb46e009d94293e069270690750f6c669c6d0ce22 (patch)
treec335154dccea12b391db6aaf7cac73db22e08f43 /perl.h
parentdf968918245d10232f955ab0965da7f8d6297a29 (diff)
downloadperl-b46e009d94293e069270690750f6c669c6d0ce22.tar.gz
Make OP_METHOD* to be of new class METHOP
Introduce a new opcode class, METHOP, which will hold class/method related info needed at runtime to improve performance of class/object method calls, then change OP_METHOD and OP_METHOD_NAMED from being UNOP/SVOP to being METHOP. Note that because OP_METHOD is a UNOP with an op_first, while OP_METHOD_NAMED is an SVOP, the first field of the METHOP structure is a union holding either op_first or op_sv. This was seen as less messy than having to introduce two new op classes. The new op class's character is '.' Nothing has changed in functionality and/or performance by this commit. It just introduces new structure which will be extended with extra fields and used in later commits. Added METHOP constructors: - newMETHOP() for method ops with dynamic method names. The only optype for this op is OP_METHOD. - newMETHOP_named() for method ops with constant method names. Optypes for this op are: OP_METHOD_NAMED (currently) and (later) OP_METHOD_SUPER, OP_METHOD_REDIR, OP_METHOD_NEXT, OP_METHOD_NEXTCAN, OP_METHOD_MAYBENEXT (This commit includes fixups by davem)
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 436c7d1a12..b958d7468e 100644
--- a/perl.h
+++ b/perl.h
@@ -2602,6 +2602,7 @@ typedef struct svop SVOP;
typedef struct padop PADOP;
typedef struct pvop PVOP;
typedef struct loop LOOP;
+typedef struct methop METHOP;
#ifdef PERL_CORE
typedef struct opslab OPSLAB;