ruby-changes:59122
From: Yusuke <ko1@a...>
Date: Mon, 9 Dec 2019 13:51:18 +0900 (JST)
Subject: [ruby-changes:59122] 3cdb37d9db (master): Revert "vm_args.c (rb_warn_check): Use iseq_unique_id instead of its pointer"
https://git.ruby-lang.org/ruby.git/commit/?id=3cdb37d9db From 3cdb37d9db9b7776f6adf96c70eacc39773718b4 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Mon, 9 Dec 2019 13:49:24 +0900 Subject: Revert "vm_args.c (rb_warn_check): Use iseq_unique_id instead of its pointer" This reverts commit 036bc1da6c6c9b0fa9b7f5968d897a9554dd770e. This caused a failure on iseq_binary mode. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/2474587 Numbering iseqs is not trivial due to dump/load. diff --git a/iseq.c b/iseq.c index b3c7ad5..7fbb906 100644 --- a/iseq.c +++ b/iseq.c @@ -427,14 +427,11 @@ rb_iseq_memsize(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L427 return size; } -static unsigned long fresh_iseq_unique_id = 0; /* -- Remove In 3.0 -- */ - static rb_iseq_t * iseq_alloc(void) { rb_iseq_t *iseq = iseq_imemo_alloc(); iseq->body = ZALLOC(struct rb_iseq_constant_body); - iseq->body->iseq_unique_id = fresh_iseq_unique_id++; /* -- Remove In 3.0 -- */ return iseq; } diff --git a/vm_args.c b/vm_args.c index 4182452..97b1d4a 100644 --- a/vm_args.c +++ b/vm_args.c @@ -593,12 +593,8 @@ VALUE rb_iseq_location(const rb_iseq_t *iseq); https://github.com/ruby/ruby/blob/trunk/vm_args.c#L593 */ static st_table *caller_to_callees = 0; -static VALUE rb_warn_check(const rb_execution_context_t * const ec, const rb_iseq_t *const iseq) +static VALUE rb_warn_check(const rb_execution_context_t * const ec, const void *const callee) { - if (!iseq) return 0; - - const void *const callee = (void *)iseq->body->iseq_unique_id; - const rb_control_frame_t * const cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); if (!cfp) return 0; diff --git a/vm_core.h b/vm_core.h index 4b1b9e4..f7ec156 100644 --- a/vm_core.h +++ b/vm_core.h @@ -447,8 +447,6 @@ struct rb_iseq_constant_body { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L447 long unsigned total_calls; /* number of total calls with `mjit_exec()` */ struct rb_mjit_unit *jit_unit; #endif - - unsigned long iseq_unique_id; /* -- Remove In 3.0 -- */ }; /* T_IMEMO/iseq */ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/