summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorPaul Johnson <paul@pjcj.net>2004-02-21 03:31:47 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-21 16:18:32 +0000
commit2814eb746a9281fd66cc5c45be3b127463ec07c7 (patch)
tree9450012410210846e803553bfba88446fa14206c /op.h
parentdb8ddb421f6758f0b11b38073916c1366f5b4515 (diff)
downloadperl-2814eb746a9281fd66cc5c45be3b127463ec07c7.tar.gz
Re: op_seq (was: Freeing code)
Message-ID: <20040221013147.GB6953@pjcj.net> Rework the OP structure to use less space. Remove op_seq (and simulate it in dump.c), replace it by op_opt and op_static, shrink op_type, remove PL_op_seqmax. p4raw-id: //depot/perl@22353
Diffstat (limited to 'op.h')
-rw-r--r--op.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/op.h b/op.h
index bd267b5931..c9f11395aa 100644
--- a/op.h
+++ b/op.h
@@ -17,6 +17,12 @@
* parent takes over role of remembering starting op.)
* op_ppaddr Pointer to current ppcode's function.
* op_type The type of the operation.
+ * op_opt Whether or not the op has been optimised by the
+ * peephole optimiser.
+ * op_static Whether or not the op is statically defined.
+ * This flag is used by the B::C compiler backend
+ * and indicates that the op should not be freed.
+ * op_spare Five spare bits!
* op_flags Flags common to all operations. See OPf_* below.
* op_private Flags peculiar to a particular operation (BUT,
* by default, set to the number of children until
@@ -38,8 +44,10 @@
OP* op_sibling; \
OP* (CPERLscope(*op_ppaddr))(pTHX); \
PADOFFSET op_targ; \
- OPCODE op_type; \
- U16 op_seq; \
+ unsigned op_type:9; \
+ unsigned op_opt:1; \
+ unsigned op_static:1; \
+ unsigned op_spare:5; \
U8 op_flags; \
U8 op_private;
#endif