summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-04-13 12:11:14 +0200
committerJean Boussier <jean.boussier@gmail.com>2023-04-13 16:36:17 +0200
commitac123f167a364c3d7a43eca78d564e41f6dbb91e (patch)
tree76c34bd65a5942ce9ef38e1753943e83082f08ee /include
parent854baee2c936006d7f38ebb27ee577c00afc6249 (diff)
downloadruby-ac123f167a364c3d7a43eca78d564e41f6dbb91e.tar.gz
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`
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/error.h3
1 files changed, 3 insertions, 0 deletions
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) |