aboutsummaryrefslogtreecommitdiffstats
path: root/method.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 11:42:34 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 11:42:34 +0000
commitae6d1928814b0c5e794ca4fb7e711a72a06f7080 (patch)
treeceb2a9ef6c63493d267159b4f4d8ab95f8b0de4a /method.h
parented7bd3e961bef70241712b1acbd9779bb56b55f1 (diff)
downloadruby-ae6d1928814b0c5e794ca4fb7e711a72a06f7080.tar.gz
* internal.h: move definition of rb_cref_t to method.h.
* eval_intern.h: move definition of rb_scope_visibility_t to method.h. * method.h: change rb_cref_t::scope_visi from VALUE to rb_scope_visibility_t. [Bug #11219] * vm.c (vm_cref_new): accept rb_method_visibility_t directly. * vm_insnhelper.c (rb_vm_rewrite_cref): don't use 0, but METHOD_VISI_UNDEF. * vm_method.c (rb_scope_visibility_set): don't need to use cast. * vm_method.c (rb_scope_module_func_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'method.h')
-rw-r--r--method.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/method.h b/method.h
index 4d1cf3e6fe..2c9bddb486 100644
--- a/method.h
+++ b/method.h
@@ -21,6 +21,28 @@
# endif
#endif
+/* cref */
+
+typedef enum {
+ METHOD_VISI_UNDEF = 0x00,
+ METHOD_VISI_PUBLIC = 0x01,
+ METHOD_VISI_PRIVATE = 0x02,
+ METHOD_VISI_PROTECTED = 0x03
+} rb_method_visibility_t;
+
+typedef struct rb_scope_visi_struct {
+ rb_method_visibility_t method_visi : 3;
+ unsigned int module_func : 1;
+} rb_scope_visibility_t;
+
+typedef struct rb_cref_struct {
+ VALUE flags;
+ const VALUE refinements;
+ const VALUE klass;
+ struct rb_cref_struct * const next;
+ rb_scope_visibility_t scope_visi;
+} rb_cref_t;
+
/* method data type */
typedef struct rb_method_entry_struct {
@@ -32,13 +54,6 @@ typedef struct rb_method_entry_struct {
} rb_method_entry_t;
typedef enum {
- METHOD_VISI_UNDEF = 0x00,
- METHOD_VISI_PUBLIC = 0x01,
- METHOD_VISI_PRIVATE = 0x02,
- METHOD_VISI_PROTECTED = 0x03
-} rb_method_visibility_t;
-
-typedef enum {
VM_METHOD_TYPE_ISEQ,
VM_METHOD_TYPE_CFUNC,
VM_METHOD_TYPE_ATTRSET,