From 99b497aa90ed7db99d29a301b47c91fba65c9cb3 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sat, 24 Dec 2022 13:17:47 +0000 Subject: Initial attack at basic 'class' feature Adds a new experimental warning, feature, keywords and enough parsing to implement basic classes with an empty `new` constructor method. Inject a $self lexical into method bodies; populate it with the object instance, suitably shifted Creates a new OP_METHSTART opcode to perform method setup Define an aux flag to remark which stashes are classes Basic implementation of fields. Basic anonymous methods. --- opnames.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opnames.h') diff --git a/opnames.h b/opnames.h index 80b6d46eff..b551ea33d6 100644 --- a/opnames.h +++ b/opnames.h @@ -433,10 +433,11 @@ typedef enum opcode { OP_FLOOR = 416, OP_IS_TAINTED = 417, OP_HELEMEXISTSOR = 418, + OP_METHSTART = 419, OP_max } opcode; -#define MAXO 419 +#define MAXO 420 #define OP_FREED MAXO /* the OP_IS_* macros are optimized to a simple range check because -- cgit v1.2.1