diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 08:40:28 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 08:40:28 +0000 |
commit | ccfe37884ab566336380d0f21e15321d6382da8f (patch) | |
tree | 23b4471775b07e7c2b7dbccc6c4ac1d5627d0848 /internal.h | |
parent | cea5f5aaee52ef756a6f7c200b0b37f9c63c01c0 (diff) |
Replace NODE_ALLOCA with T_IMEMO (imemo_alloc)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/internal.h b/internal.h index 4ac024d9af..b3d3463895 100644 --- a/internal.h +++ b/internal.h @@ -844,7 +844,8 @@ enum imemo_type { imemo_memo = 5, imemo_ment = 6, imemo_iseq = 7, - imemo_mask = 0x07 + imemo_alloc = 8, + imemo_mask = 0x0f }; static inline enum imemo_type @@ -869,12 +870,12 @@ imemo_type_p(VALUE imemo, enum imemo_type imemo_type) } /* 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 +#define IMEMO_FL_USHIFT (FL_USHIFT + 4) +#define IMEMO_FL_USER0 FL_USER4 +#define IMEMO_FL_USER1 FL_USER5 +#define IMEMO_FL_USER2 FL_USER6 +#define IMEMO_FL_USER3 FL_USER7 +#define IMEMO_FL_USER4 FL_USER8 /* CREF in method.h */ @@ -929,6 +930,14 @@ rb_vm_ifunc_proc_new(VALUE (*func)(ANYARGS), const void *data) return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS); } +typedef struct rb_imemo_alloc_struct { + VALUE flags; + VALUE reserved; + VALUE *ptr; /* malloc'ed buffer */ + VALUE next; /* next imemo */ + size_t cnt; /* buffer size in VALUE */ +} rb_imemo_alloc_t; + /* MEMO */ struct MEMO { |