summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-10-21 12:58:51 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-10-21 14:56:48 -0700
commit13bd617ea6fdf72467c593639cf33312a06c330c (patch)
tree9da47089160cfa85d6723256b1e952dcc0843a52 /vm.c
parent87bb0bee6b9843ea32ca6bb48f9e03b1876b7c48 (diff)
Remove unused class serial
Before object shapes, we were using class serial to invalidate inline caches. Now that we use shape_id for inline cache keys, the class serial is unnecessary. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6605
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/vm.c b/vm.c
index 15dae878df..7f7ae3a6d6 100644
--- a/vm.c
+++ b/vm.c
@@ -488,13 +488,6 @@ jit_exec(rb_execution_context_t *ec)
#define PROCDEBUG 0
-rb_serial_t
-rb_next_class_serial(void)
-{
- rb_serial_t class_serial = NEXT_CLASS_SERIAL();
- return class_serial;
-}
-
VALUE rb_cRubyVM;
VALUE rb_cThread;
VALUE rb_mRubyVMFrozenCore;
@@ -532,7 +525,6 @@ unsigned int ruby_vm_event_local_num;
rb_serial_t ruby_vm_constant_cache_invalidations = 0;
rb_serial_t ruby_vm_constant_cache_misses = 0;
-rb_serial_t ruby_vm_class_serial = 1;
rb_serial_t ruby_vm_global_cvar_state = 1;
static const struct rb_callcache vm_empty_cc = {
@@ -612,7 +604,6 @@ rb_dtrace_setup(rb_execution_context_t *ec, VALUE klass, ID id,
* {
* :constant_cache_invalidations=>2,
* :constant_cache_misses=>14,
- * :class_serial=>546,
* :global_cvar_state=>27
* }
*
@@ -624,7 +615,7 @@ rb_dtrace_setup(rb_execution_context_t *ec, VALUE klass, ID id,
static VALUE
vm_stat(int argc, VALUE *argv, VALUE self)
{
- static VALUE sym_constant_cache_invalidations, sym_constant_cache_misses, sym_class_serial, sym_global_cvar_state;
+ static VALUE sym_constant_cache_invalidations, sym_constant_cache_misses, sym_global_cvar_state;
VALUE arg = Qnil;
VALUE hash = Qnil, key = Qnil;
@@ -644,7 +635,6 @@ vm_stat(int argc, VALUE *argv, VALUE self)
#define S(s) sym_##s = ID2SYM(rb_intern_const(#s))
S(constant_cache_invalidations);
S(constant_cache_misses);
- S(class_serial);
S(global_cvar_state);
#undef S
@@ -656,7 +646,6 @@ vm_stat(int argc, VALUE *argv, VALUE self)
SET(constant_cache_invalidations, ruby_vm_constant_cache_invalidations);
SET(constant_cache_misses, ruby_vm_constant_cache_misses);
- SET(class_serial, ruby_vm_class_serial);
SET(global_cvar_state, ruby_vm_global_cvar_state);
#undef SET