summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-01-18 10:26:46 -0500
committerPeter Zhu <peter@peterzhu.ca>2023-01-19 09:47:21 -0500
commitdcc676a86e5fd882a5ed2e5345898e645ccea946 (patch)
tree27f4e64cf7cd2c40259f866fa5c7c16f4beebb97
parentf7b72462aa27716370c6bea1f2c240983aca9a55 (diff)
ci in iseq can only be object or null
It looks like rb_callinfo in iseq can only be either a Ruby object or null, since it cannot be allocated on the stack.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7147
-rw-r--r--iseq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 869ed4da6a..343904b4d5 100644
--- a/iseq.c
+++ b/iseq.c
@@ -324,7 +324,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
if (body->call_data) {
for (unsigned int i=0; i<body->ci_size; i++) {
struct rb_call_data *cds = body->call_data;
- if (!SPECIAL_CONST_P((VALUE)cds[i].ci)) {
+ if (cds[i].ci) {
cds[i].ci = (struct rb_callinfo *)rb_gc_location((VALUE)cds[i].ci);
}
cds[i].cc = (struct rb_callcache *)rb_gc_location((VALUE)cds[i].cc);
@@ -400,7 +400,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
const struct rb_callinfo *ci = cds[i].ci;
const struct rb_callcache *cc = cds[i].cc;
- if (vm_ci_markable(ci)) {
+ if (ci) {
rb_gc_mark_movable((VALUE)ci);
}