@@ -254,7 +254,7 @@ protected Object usASCII(RubyRegexp regexp, boolean atStart, Encoding encoding)
254
254
if (tregex != null ) {
255
255
return tregex ;
256
256
} else {
257
- return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding );
257
+ return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding , this );
258
258
}
259
259
}
260
260
@@ -264,7 +264,7 @@ protected Object latin1(RubyRegexp regexp, boolean atStart, Encoding encoding) {
264
264
if (tregex != null ) {
265
265
return tregex ;
266
266
} else {
267
- return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding );
267
+ return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding , this );
268
268
}
269
269
}
270
270
@@ -274,7 +274,7 @@ protected Object utf8(RubyRegexp regexp, boolean atStart, Encoding encoding) {
274
274
if (tregex != null ) {
275
275
return tregex ;
276
276
} else {
277
- return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding );
277
+ return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding , this );
278
278
}
279
279
}
280
280
@@ -284,7 +284,7 @@ protected Object binary(RubyRegexp regexp, boolean atStart, Encoding encoding) {
284
284
if (tregex != null ) {
285
285
return tregex ;
286
286
} else {
287
- return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding );
287
+ return regexp .tregexCache .compile (getContext (), regexp , atStart , encoding , this );
288
288
}
289
289
}
290
290
@@ -298,6 +298,13 @@ protected Object other(RubyRegexp regexp, boolean atStart, Encoding encoding) {
298
298
return nil ;
299
299
}
300
300
301
+ DispatchNode getWarnOnFallbackNode () {
302
+ if (warnOnFallbackNode == null ) {
303
+ CompilerDirectives .transferToInterpreterAndInvalidate ();
304
+ warnOnFallbackNode = insert (DispatchNode .create ());
305
+ }
306
+ return warnOnFallbackNode ;
307
+ }
301
308
}
302
309
303
310
public abstract static class RegexpStatsNode extends CoreMethodArrayArgumentsNode {
0 commit comments