Skip to content

Commit 97a175d

Browse files
committed
Calling LazyDisaptchNode when it is really needed in matchInRegionTRegex specialization
1 parent c40cc6f commit 97a175d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/truffleruby/core/regexp/TruffleRegexpNodes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ protected static Object matchInRegionTRegex(
917917
atStart,
918918
startPos,
919919
createMatchData,
920-
warnOnFallbackNode.get(node),
920+
warnOnFallbackNode,
921921
fallbackMatchInRegionNode.get(node));
922922
}
923923

@@ -987,11 +987,11 @@ protected static Object matchInRegionTRegex(
987987

988988
private static Object fallbackToJoni(Node node, RubyRegexp regexp, Object string, RubyEncoding encoding,
989989
int fromPos, int toPos,
990-
boolean atStart, int startPos, boolean createMatchData, DispatchNode warnOnFallbackNode,
990+
boolean atStart, int startPos, boolean createMatchData, LazyDispatchNode warnOnFallbackNode,
991991
MatchInRegionNode fallbackMatchInRegionNode) {
992992
if (getContext(node).getOptions().WARN_TRUFFLE_REGEX_MATCH_FALLBACK) {
993993

994-
warnOnFallbackNode.call(
994+
warnOnFallbackNode.get(node).call(
995995
getContext(node).getCoreLibrary().truffleRegexpOperationsModule,
996996
"warn_fallback",
997997
new Object[]{

0 commit comments

Comments
 (0)