From 4bc9850db0d445e62eead401add252c709081727 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 10 Jun 2015 23:55:33 +0000 Subject: * method.h: embed rb_method_entry_t::attr::flags (5 bits) into rb_method_entry_t::flags to make one word spare space. Add some macros to access these flags. * vm_method.c: use these macros. * internal.h: define IMEMO_FL_USHIFT and IMEMO_FL_USER[0-4] for T_IMEMO local flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index f30ddee905..5fb1493be6 100644 --- a/internal.h +++ b/internal.h @@ -545,6 +545,14 @@ imemo_type(VALUE imemo) return (RBASIC(imemo)->flags >> FL_USHIFT) & imemo_mask; } +/* FL_USER0 to FL_USER2 is for type */ +#define IMEMO_FL_USHIFT (FL_USHIFT + 3) +#define IMEMO_FL_USER0 FL_USER3 +#define IMEMO_FL_USER1 FL_USER4 +#define IMEMO_FL_USER2 FL_USER5 +#define IMEMO_FL_USER3 FL_USER6 +#define IMEMO_FL_USER4 FL_USER7 + /* CREF in method.h */ /* SVAR */ -- cgit v1.2.3