ruby-changes:49962
From: nobu <ko1@a...>
Date: Sun, 28 Jan 2018 23:16:57 +0900 (JST)
Subject: [ruby-changes:49962] nobu:r62080 (trunk): method.h: VM_METHOD_TYPE_MINIMUM_BITS
nobu 2018-01-28 23:16:48 +0900 (Sun, 28 Jan 2018) New Revision: 62080 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62080 Log: method.h: VM_METHOD_TYPE_MINIMUM_BITS Modified files: trunk/method.h Index: method.h =================================================================== --- method.h (revision 62079) +++ method.h (revision 62080) @@ -114,6 +114,8 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/method.h#L114 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 { https://github.com/ruby/ruby/blob/trunk/method.h#L155 }; 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/