summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-07-16 16:14:58 +0100
committerDavid Mitchell <davem@iabyn.com>2019-08-05 11:31:12 +0100
commit8c47b5bce7a3d69f27ab4e998ed5827d0c9964de (patch)
treec970e410ec2a08b1ef67bf9b524f43a2d7d2baa6 /op.h
parentc63fff64d7aa23894e5fa68504e177f77b72fce9 (diff)
downloadperl-8c47b5bce7a3d69f27ab4e998ed5827d0c9964de.tar.gz
OPSLOT: replace opslot_next with opslot_size
Currently, each allocated opslot has a pointer to the opslot that was allocated immediately above it. Replace this with a U16 opslot_size field giving the size of the opslot. The next opslot can then be found by adding slot->opslot_size * sizeof(void*) to slot. This saves space.
Diffstat (limited to 'op.h')
-rw-r--r--op.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/op.h b/op.h
index 2da5edc917..057b4550dd 100644
--- a/op.h
+++ b/op.h
@@ -689,8 +689,7 @@ least an C<UNOP>.
#ifdef PERL_CORE
struct opslot {
- /* keep opslot_next first */
- OPSLOT * opslot_next; /* next slot */
+ U16 opslot_size; /* size of this slot (in pointers) */
U16 opslot_offset; /* offset from start of slab (in ptr units) */
OP opslot_op; /* the op itself */
};