summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 23:55:33 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 23:55:33 +0000
commita5fa5f34b051e4d77ea0d768deb006a45acd9245 (patch)
treea6c01116aabc2372e3d0a21c91ee3e6f715c8192 /internal.h
parentc7edd997e87d609feee894bf61b45f7f0a956eba (diff)
* 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
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h8
1 files changed, 8 insertions, 0 deletions
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 */