From 611da9faef76777e57718cf5b0286b965879479c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 12 Aug 2021 10:42:33 +0900 Subject: [PATCH] Mark `rb_unexpected_type` as "cold" [Bug #18062] So that it will not interfere the fast path in `Check_Type`. --- include/ruby/internal/error.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ruby/internal/error.h b/include/ruby/internal/error.h index 7e9d5c4167..bd5c4d2ea1 100644 --- a/include/ruby/internal/error.h +++ b/include/ruby/internal/error.h @@ -61,7 +61,7 @@ NORETURN(void rb_syserr_fail_str(int, VALUE)); NORETURN(void rb_mod_syserr_fail(VALUE, int, const char*)); NORETURN(void rb_mod_syserr_fail_str(VALUE, int, VALUE)); NORETURN(void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*)); -NORETURN(void rb_unexpected_type(VALUE,int)); +COLDFUNC NORETURN(void rb_unexpected_type(VALUE,int)); VALUE *rb_ruby_verbose_ptr(void); VALUE *rb_ruby_debug_ptr(void);