1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add some "cold" marks

This commit is contained in:
Nobuyoshi Nakada 2021-08-14 10:16:37 +09:00
parent edd27e120e
commit 58d82eacef
Notes: git 2021-08-14 23:12:27 +09:00

View file

@ -972,7 +972,7 @@ rb_builtin_class_name(VALUE x)
return etype;
}
NORETURN(static void unexpected_type(VALUE, int, int));
COLDFUNC NORETURN(static void unexpected_type(VALUE, int, int));
#define UNDEF_LEAKED "undef leaked to the Ruby space"
static void
@ -1001,7 +1001,7 @@ rb_check_type(VALUE x, int t)
{
int xt;
if (x == Qundef) {
if (RB_UNLIKELY(x == Qundef)) {
rb_bug(UNDEF_LEAKED);
}
@ -1022,7 +1022,7 @@ rb_check_type(VALUE x, int t)
void
rb_unexpected_type(VALUE x, int t)
{
if (x == Qundef) {
if (RB_UNLIKELY(x == Qundef)) {
rb_bug(UNDEF_LEAKED);
}