We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77e53f9 commit fd03b3eCopy full SHA for fd03b3e
src/main/java/org/truffleruby/core/string/TStringCache.java
@@ -21,6 +21,10 @@
21
import com.oracle.truffle.api.CompilerDirectives;
22
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
23
24
+/** This cache caches (byte[], encoding) to TruffleString. The main value is from using it for string literals in files
25
+ * without {@code # frozen_string_literal: true}, so equivalent string literals are shared. For most other usages there
26
+ * is another higher-level cache but this cache then helps to deduplicate TruffleString's across the different
27
+ * higher-level caches. */
28
public final class TStringCache {
29
30
private final WeakValueCache<TBytesKey, TruffleString> bytesToTString = new WeakValueCache<>();
0 commit comments