summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2023-10-26 11:45:52 +0200
committerAaron Patterson <[email protected]>2023-10-26 13:07:08 -0700
commit8e62596e38fc4a9247f306fb81c95ee85a42acbe (patch)
tree35659384afe2a5c423c2e68ba6855bc4d95e2d5a /shape.c
parent719b40bdf636ff21b3951da2843595c538ead46c (diff)
Move some defines from shape.h to shape.c
If they are only used there, we might as well not expose them.
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shape.c b/shape.c
index a2e2e4446d..6e35ea55ee 100644
--- a/shape.c
+++ b/shape.c
@@ -19,12 +19,19 @@
#define SHAPE_DEBUG (VM_CHECK_MODE > 0)
#endif
+#if SIZEOF_SHAPE_T == 4
+#define SHAPE_BUFFER_SIZE 0x80000
+#else
+#define SHAPE_BUFFER_SIZE 0x8000
+#endif
+
#define SINGLE_CHILD_TAG 0x1
#define TAG_SINGLE_CHILD(x) (struct rb_id_table *)((uintptr_t)x | SINGLE_CHILD_TAG)
#define SINGLE_CHILD_MASK (~((uintptr_t)SINGLE_CHILD_TAG))
#define SINGLE_CHILD_P(x) (((uintptr_t)x) & SINGLE_CHILD_TAG)
#define SINGLE_CHILD(x) (rb_shape_t *)((uintptr_t)x & SINGLE_CHILD_MASK)
#define ANCESTOR_CACHE_THRESHOLD 10
+#define MAX_SHAPE_ID (SHAPE_BUFFER_SIZE - 1)
static ID id_frozen;
static ID id_t_object;