diff --git a/method.h b/method.h index 0cb1b4135a..3e424fbc02 100644 --- a/method.h +++ b/method.h @@ -114,6 +114,8 @@ typedef enum { END_OF_ENUMERATION(VM_METHOD_TYPE) } rb_method_type_t; +#define VM_METHOD_TYPE_MINIMUM_BITS 4 +/* TODO: STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS */ #ifndef rb_iseq_t typedef struct rb_iseq_struct rb_iseq_t; @@ -153,7 +155,7 @@ enum method_optimized_type { }; PACKED_STRUCT_UNALIGNED(struct rb_method_definition_struct { - BITFIELD(rb_method_type_t) type : 4; + BITFIELD(rb_method_type_t) type : VM_METHOD_TYPE_MINIMUM_BITS; int alias_count : 28; int complemented_count : 28;