1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

method.h: VM_METHOD_TYPE_MINIMUM_BITS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-28 14:16:48 +00:00
parent c0d22698e3
commit 2e12695929

View file

@ -114,6 +114,8 @@ typedef enum {
END_OF_ENUMERATION(VM_METHOD_TYPE) END_OF_ENUMERATION(VM_METHOD_TYPE)
} rb_method_type_t; } rb_method_type_t;
#define VM_METHOD_TYPE_MINIMUM_BITS 4
/* TODO: STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS */
#ifndef rb_iseq_t #ifndef rb_iseq_t
typedef struct rb_iseq_struct 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 { 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 alias_count : 28;
int complemented_count : 28; int complemented_count : 28;