void rb_clear_cache(void) { struct cache_entry *ent, *end; rb_vm_change_state(); if (!ruby_running) return; ent = cache; end = ent + CACHE_SIZE; while (ent < end) { ent->mid = 0; ent++; } }
void rb_clear_cache_by_class(VALUE klass) { struct cache_entry *ent, *end; rb_vm_change_state(); if (!ruby_running) return; ent = cache; end = ent + CACHE_SIZE; while (ent < end) { if (ent->klass == klass || ent->oklass == klass) { ent->mid = 0; } ent++; } }
static void rb_clear_cache_for_undef(VALUE klass, ID id) { struct cache_entry *ent, *end; rb_vm_change_state(); if (!ruby_running) return; ent = cache; end = ent + CACHE_SIZE; while (ent < end) { if (ent->oklass == klass && ent->mid == id) { ent->mid = 0; } ent++; } }
void rb_clear_cache_by_class(VALUE klass) { rb_vm_change_state(); }
static void rb_clear_cache_by_id(ID id) { rb_vm_change_state(); }
static void rb_clear_cache_for_undef(VALUE klass, ID id) { rb_vm_change_state(); }
void rb_clear_cache(void) { rb_vm_change_state(); }