Check type with BUILTIN_TYPE in method cache clear
We know that this is a heap-allocated object (a CLASS, MODULE, or ICLASS) so we don't need to check if it is an immediate value. This should be very slightly faster.
This commit is contained in:
parent
8e56d3a6ab
commit
a01d22b8c1
Notes:
git
2019-12-18 02:19:27 +09:00
@ -70,7 +70,7 @@ rb_class_clear_method_cache(VALUE klass, VALUE arg)
|
|||||||
mjit_remove_class_serial(RCLASS_SERIAL(klass));
|
mjit_remove_class_serial(RCLASS_SERIAL(klass));
|
||||||
RCLASS_SERIAL(klass) = rb_next_class_serial();
|
RCLASS_SERIAL(klass) = rb_next_class_serial();
|
||||||
|
|
||||||
if (RB_TYPE_P(klass, T_ICLASS)) {
|
if (BUILTIN_TYPE(klass) == T_ICLASS) {
|
||||||
struct rb_id_table *table = RCLASS_CALLABLE_M_TBL(klass);
|
struct rb_id_table *table = RCLASS_CALLABLE_M_TBL(klass);
|
||||||
if (table) {
|
if (table) {
|
||||||
rb_id_table_clear(table);
|
rb_id_table_clear(table);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user