This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate the macros FT_RETURN_FALSE() and FT_RETURN_TRUE().
[perl5.git] / op.h
diff --git a/op.h b/op.h
index 6bc6c82..3f1e250 100644 (file)
--- a/op.h
+++ b/op.h
  *     op_type         The type of the operation.
  *     op_opt          Whether or not the op has been optimised by the
  *                     peephole optimiser.
- *
- *                     See the comments in S_clear_yystack() for more
- *                     details on the following three flags:
- *
- *     op_latefree     tell op_free() to clear this op (and free any kids)
- *                     but not yet deallocate the struct. This means that
- *                     the op may be safely op_free()d multiple times
- *     op_latefreed    an op_latefree op has been op_free()d
- *     op_attached     this op (sub)tree has been attached to a CV
  *     op_slabbed      allocated via opslab
  *     op_savefree     on savestack via SAVEFREEOP
- *
- *     op_spare        a spare bit!
+ *     op_spare        Four 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
@@ -61,12 +51,9 @@ typedef PERL_BITFIELD16 Optype;
     PADOFFSET  op_targ;                \
     PERL_BITFIELD16 op_type:9;         \
     PERL_BITFIELD16 op_opt:1;          \
-    PERL_BITFIELD16 op_latefree:1;     \
-    PERL_BITFIELD16 op_latefreed:1;    \
-    PERL_BITFIELD16 op_attached:1;     \
     PERL_BITFIELD16 op_slabbed:1;      \
     PERL_BITFIELD16 op_savefree:1;     \
-    PERL_BITFIELD16 op_spare:1;                \
+    PERL_BITFIELD16 op_spare:4;                \
     U8         op_flags;               \
     U8         op_private;
 #endif
@@ -258,6 +245,7 @@ Deprecated.  Use C<GIMME_V> instead.
 #define        OPpCONST_STRICT         8       /* bareword subject to strict 'subs' */
 #define OPpCONST_ENTERED       16      /* Has been entered as symbol. */
 #define OPpCONST_BARE          64      /* Was a bare word (filehandle?). */
+#define OPpCONST_FOLDED                128     /* Result of constant folding */
 
 /* Private for OP_FLIP/FLOP */
 #define OPpFLIP_LINENUM                64      /* Range arg potentially a line num. */
@@ -738,7 +726,7 @@ least an C<UNOP>.
  * cating an op if there are no freed ops available or big enough.
  */
 
-#if !defined(PL_OP_SLAB_ALLOC) && defined(PERL_CORE)
+#ifdef PERL_CORE
 struct opslot {
     /* keep opslot_next first */
     OPSLOT *   opslot_next;            /* next slot */
@@ -751,6 +739,10 @@ struct opslab {
     OPSLAB *   opslab_next;            /* next slab */
     OP *       opslab_freed;           /* chain of freed ops */
     size_t     opslab_refcnt;          /* number of ops */
+# ifdef PERL_DEBUG_READONLY_OPS
+    U16                opslab_size;            /* size of slab in pointers */
+    bool       opslab_readonly;
+# endif
     OPSLOT     opslab_slots;           /* slots begin here */
 };