summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2023-01-25 13:45:32 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2023-01-25 14:48:28 -0500
commit78fcc9847a9db6d42c8c263154ec05903a370b6b (patch)
treee310032c5be7cf4ab698bf8cb530c5f69f3b9bac /shape.h
parent5e1e5af2e737bdc5537b4d2025d2ae8e57df3cdb (diff)
downloadruby-78fcc9847a9db6d42c8c263154ec05903a370b6b.tar.gz
Limit maximum number of IVs on a shape
Create SHAPE_MAX_NUM_IVS (currently 50) and limit all shapes to that number of IVs. When a shape has more than 50 IVs, fallback to the obj_too_complex shape which uses hash lookup for ivs.
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/shape.h b/shape.h
index 60084a4aff..df0e633073 100644
--- a/shape.h
+++ b/shape.h
@@ -31,6 +31,7 @@ typedef uint16_t shape_id_t;
# define SHAPE_BITMAP_SIZE 16384
# define SHAPE_MAX_VARIATIONS 8
+# define SHAPE_MAX_NUM_IVS 50
# define MAX_SHAPE_ID (SHAPE_MASK - 1)
# define INVALID_SHAPE_ID SHAPE_MASK