summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-28 14:16:48 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-28 14:16:48 (GMT)
commit2e126959299f6b12c29d8243a1e7fe1fae2c9fd2 (patch)
tree6a79f9ce1ffc17bca1820a697152afaa320a7beb /method.h
parentc0d22698e3f2089549abe8b50a42c00844681cab (diff)
method.h: VM_METHOD_TYPE_MINIMUM_BITS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/method.h b/method.h
index 0cb1b41..3e424fb 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;