summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2023-04-13 12:11:14 +0200
committerJean Boussier <[email protected]>2023-04-13 16:36:17 +0200
commitac123f167a364c3d7a43eca78d564e41f6dbb91e ()
tree76c34bd65a5942ce9ef38e1753943e83082f08ee /shape.c
parent854baee2c936006d7f38ebb27ee577c00afc6249 (diff)
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`
Notes: Merged: https://.com/ruby/ruby/pull/7708
-rw-r--r--shape.c11
1 files changed, 11 insertions, 0 deletions
@@ -7,6 +7,7 @@
#include "internal/gc.h"
#include "internal/symbol.h"
#include "internal/variable.h"
#include "variable.h"
#include <stdbool.h>
@@ -407,6 +408,16 @@ rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id)
if (variation_created) {
RCLASS_EXT(klass)->variation_count++;
}
}