Skip to content

Commit e64d434

Browse files
committed
No need to share the return value of RubyInlineParsingRequestNode
1 parent dcb4f98 commit e64d434

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/main/java/org/truffleruby/language/RubyInlineParsingRequestNode.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.truffleruby.language.methods.DeclarationContext;
2727
import org.truffleruby.language.methods.InternalMethod;
2828
import org.truffleruby.language.methods.SharedMethodInfo;
29-
import org.truffleruby.language.objects.shared.SharedObjects;
3029
import org.truffleruby.parser.ParserContext;
3130
import org.truffleruby.parser.RubySource;
3231
import org.truffleruby.parser.TranslatorDriver;
@@ -88,14 +87,9 @@ public Object execute(VirtualFrame frame) {
8887
RubyArguments.getBlock(frame),
8988
new Object[]{});
9089

91-
final Object value = callNode.call(arguments);
92-
93-
// The return value will be leaked to Java, share it.
94-
if (context.getOptions().SHARED_OBJECTS_ENABLED) {
95-
SharedObjects.writeBarrier(context, value);
96-
}
97-
98-
return value;
90+
// No need to share the returned value here, InlineParsingRequest is not exposed to the Context API
91+
// and is only used by instruments (e.g., the debugger) or the RubyLanguage itself.
92+
return callNode.call(arguments);
9993
}
10094

10195
}

0 commit comments

Comments
 (0)