Get rid of imemo_ast

It has been marked as obsolete for a while and I see no reason
to keep it.
This commit is contained in:
Jean Boussier 2025-07-29 11:56:11 +02:00
parent d4020dd5fa
commit 7ee127d2d1
6 changed files with 0 additions and 18 deletions

View file

@ -305,7 +305,6 @@ RB_DEBUG_COUNTER(obj_imemo_ment)
RB_DEBUG_COUNTER(obj_imemo_iseq) RB_DEBUG_COUNTER(obj_imemo_iseq)
RB_DEBUG_COUNTER(obj_imemo_env) RB_DEBUG_COUNTER(obj_imemo_env)
RB_DEBUG_COUNTER(obj_imemo_tmpbuf) RB_DEBUG_COUNTER(obj_imemo_tmpbuf)
RB_DEBUG_COUNTER(obj_imemo_ast)
RB_DEBUG_COUNTER(obj_imemo_cref) RB_DEBUG_COUNTER(obj_imemo_cref)
RB_DEBUG_COUNTER(obj_imemo_svar) RB_DEBUG_COUNTER(obj_imemo_svar)
RB_DEBUG_COUNTER(obj_imemo_throw_data) RB_DEBUG_COUNTER(obj_imemo_throw_data)

View file

@ -500,7 +500,6 @@ count_imemo_objects(int argc, VALUE *argv, VALUE self)
INIT_IMEMO_TYPE_ID(imemo_ment); INIT_IMEMO_TYPE_ID(imemo_ment);
INIT_IMEMO_TYPE_ID(imemo_iseq); INIT_IMEMO_TYPE_ID(imemo_iseq);
INIT_IMEMO_TYPE_ID(imemo_tmpbuf); INIT_IMEMO_TYPE_ID(imemo_tmpbuf);
INIT_IMEMO_TYPE_ID(imemo_ast);
INIT_IMEMO_TYPE_ID(imemo_callinfo); INIT_IMEMO_TYPE_ID(imemo_callinfo);
INIT_IMEMO_TYPE_ID(imemo_callcache); INIT_IMEMO_TYPE_ID(imemo_callcache);
INIT_IMEMO_TYPE_ID(imemo_constcache); INIT_IMEMO_TYPE_ID(imemo_constcache);

13
imemo.c
View file

@ -16,7 +16,6 @@ rb_imemo_name(enum imemo_type type)
// put no default case to get a warning if an imemo type is missing // put no default case to get a warning if an imemo type is missing
switch (type) { switch (type) {
#define IMEMO_NAME(x) case imemo_##x: return #x; #define IMEMO_NAME(x) case imemo_##x: return #x;
IMEMO_NAME(ast);
IMEMO_NAME(callcache); IMEMO_NAME(callcache);
IMEMO_NAME(callinfo); IMEMO_NAME(callinfo);
IMEMO_NAME(constcache); IMEMO_NAME(constcache);
@ -220,10 +219,6 @@ rb_imemo_memsize(VALUE obj)
{ {
size_t size = 0; size_t size = 0;
switch (imemo_type(obj)) { switch (imemo_type(obj)) {
case imemo_ast:
rb_bug("imemo_ast is obsolete");
break;
case imemo_callcache: case imemo_callcache:
break; break;
case imemo_callinfo: case imemo_callinfo:
@ -336,10 +331,6 @@ void
rb_imemo_mark_and_move(VALUE obj, bool reference_updating) rb_imemo_mark_and_move(VALUE obj, bool reference_updating)
{ {
switch (imemo_type(obj)) { switch (imemo_type(obj)) {
case imemo_ast:
rb_bug("imemo_ast is obsolete");
break;
case imemo_callcache: { case imemo_callcache: {
/* cc is callcache. /* cc is callcache.
* *
@ -600,10 +591,6 @@ void
rb_imemo_free(VALUE obj) rb_imemo_free(VALUE obj)
{ {
switch (imemo_type(obj)) { switch (imemo_type(obj)) {
case imemo_ast:
rb_bug("imemo_ast is obsolete");
break;
case imemo_callcache: case imemo_callcache:
RB_DEBUG_COUNTER_INC(obj_imemo_callcache); RB_DEBUG_COUNTER_INC(obj_imemo_callcache);

View file

@ -37,7 +37,6 @@ enum imemo_type {
imemo_ment = 6, imemo_ment = 6,
imemo_iseq = 7, imemo_iseq = 7,
imemo_tmpbuf = 8, imemo_tmpbuf = 8,
imemo_ast = 9, // Obsolete due to the universal parser
imemo_callinfo = 10, imemo_callinfo = 10,
imemo_callcache = 11, imemo_callcache = 11,
imemo_constcache = 12, imemo_constcache = 12,

View file

@ -405,7 +405,6 @@ pub const imemo_memo: imemo_type = 5;
pub const imemo_ment: imemo_type = 6; pub const imemo_ment: imemo_type = 6;
pub const imemo_iseq: imemo_type = 7; pub const imemo_iseq: imemo_type = 7;
pub const imemo_tmpbuf: imemo_type = 8; pub const imemo_tmpbuf: imemo_type = 8;
pub const imemo_ast: imemo_type = 9;
pub const imemo_callinfo: imemo_type = 10; pub const imemo_callinfo: imemo_type = 10;
pub const imemo_callcache: imemo_type = 11; pub const imemo_callcache: imemo_type = 11;
pub const imemo_constcache: imemo_type = 12; pub const imemo_constcache: imemo_type = 12;

View file

@ -222,7 +222,6 @@ pub const imemo_memo: imemo_type = 5;
pub const imemo_ment: imemo_type = 6; pub const imemo_ment: imemo_type = 6;
pub const imemo_iseq: imemo_type = 7; pub const imemo_iseq: imemo_type = 7;
pub const imemo_tmpbuf: imemo_type = 8; pub const imemo_tmpbuf: imemo_type = 8;
pub const imemo_ast: imemo_type = 9;
pub const imemo_callinfo: imemo_type = 10; pub const imemo_callinfo: imemo_type = 10;
pub const imemo_callcache: imemo_type = 11; pub const imemo_callcache: imemo_type = 11;
pub const imemo_constcache: imemo_type = 12; pub const imemo_constcache: imemo_type = 12;