From ac123f167a364c3d7a43eca78d564e41f6dbb91e Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 13 Apr 2023 12:11:14 +0200 Subject: Emit a performance warning when a class reached max variations [Feature #19538] This new `peformance` warning category is disabled by default. It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true` --- include/ruby/internal/error.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/ruby') diff --git a/include/ruby/internal/error.h b/include/ruby/internal/error.h index b30c231ac1..8ebf7cd2ab 100644 --- a/include/ruby/internal/error.h +++ b/include/ruby/internal/error.h @@ -50,6 +50,9 @@ typedef enum { /** Warning is for experimental features. */ RB_WARN_CATEGORY_EXPERIMENTAL, + /** Warning is for performance issues (not enabled by -w). */ + RB_WARN_CATEGORY_PERFORMANCE, + RB_WARN_CATEGORY_ALL_BITS = ( (1U << RB_WARN_CATEGORY_DEPRECATED) | (1U << RB_WARN_CATEGORY_EXPERIMENTAL) | -- cgit v1.2.3