Skip to content

Commit 7c88221

Browse files
committed
[GR-17457] Add missing TruffleBoundary for FrozenStringLiterals methods
* getBytes() is virtual, and we should not PE through those unprofiled methods.
1 parent 8ad54d1 commit 7c88221

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/truffleruby/core/string/FrozenStringLiterals.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package org.truffleruby.core.string;
1111

12+
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
1213
import org.jcodings.Encoding;
1314
import org.truffleruby.collections.WeakValueCache;
1415
import org.truffleruby.core.rope.CodeRange;
@@ -25,10 +26,12 @@ public FrozenStringLiterals(RopeCache ropeCache) {
2526
this.ropeCache = ropeCache;
2627
}
2728

29+
@TruffleBoundary
2830
public ImmutableRubyString getFrozenStringLiteral(Rope rope) {
2931
return getFrozenStringLiteral(rope.getBytes(), rope.getEncoding(), rope.getCodeRange());
3032
}
3133

34+
@TruffleBoundary
3235
public ImmutableRubyString getFrozenStringLiteral(byte[] bytes, Encoding encoding, CodeRange codeRange) {
3336
// Ensure all ImmutableRubyString have a Rope from the RopeCache
3437
final LeafRope cachedRope = ropeCache.getRope(bytes, encoding, codeRange);

0 commit comments

Comments
 (0)