Skip to content

Commit 2be717a

Browse files
committed
Shrink struct rb_callinfo to 32 bytes
This shouldn't do anything right now under the default GC, but in the future (or now on MMTK?) this would allow them to be allocated from a smaller size pool.
1 parent f9c51ac commit 2be717a

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

vm_callinfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ struct rb_callinfo {
6666
VALUE flags;
6767
const struct rb_callinfo_kwarg *kwarg;
6868
VALUE mid;
69-
VALUE flag;
70-
VALUE argc;
69+
unsigned int flag;
70+
unsigned int argc;
7171
};
7272

7373
#if !defined(USE_EMBED_CI) || (USE_EMBED_CI+0)
@@ -146,7 +146,7 @@ vm_ci_flag(const struct rb_callinfo *ci)
146146
return (unsigned int)((((VALUE)ci) >> CI_EMBED_FLAG_SHFT) & CI_EMBED_FLAG_MASK);
147147
}
148148
else {
149-
return (unsigned int)ci->flag;
149+
return ci->flag;
150150
}
151151
}
152152

@@ -157,7 +157,7 @@ vm_ci_argc(const struct rb_callinfo *ci)
157157
return (unsigned int)((((VALUE)ci) >> CI_EMBED_ARGC_SHFT) & CI_EMBED_ARGC_MASK);
158158
}
159159
else {
160-
return (unsigned int)ci->argc;
160+
return ci->argc;
161161
}
162162
}
163163

yjit/src/cruby_bindings.inc.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zjit/src/cruby_bindings.inc.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)