diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-14 10:16:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-14 23:11:58 +0900 |
commit | 58d82eacefe8060bc3f689491a423de5f2581d1d (patch) | |
tree | 9b8a865ccbca33663d0f50ff628504b95bf51131 /error.c | |
parent | edd27e120eca13be1754d4111dfc3cf2ab2f99f8 (diff) |
Add some "cold" marks
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4741
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } |