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 a514226 commit 8bff015Copy full SHA for 8bff015
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java
@@ -974,10 +974,15 @@ long doString(String s) {
974
} else if (s.length() == 1) {
975
return (~s.codePointAt(0) << IDTAG_SHIFT) | IDTAG_SPECIAL;
976
} else {
977
- return doGeneric(s);
+ return strHash(s);
978
}
979
980
981
+ @TruffleBoundary
982
+ private static int strHash(String s) {
983
+ return s.hashCode();
984
+ }
985
+
986
@Specialization
987
long doPString(PString s,
988
@Shared("isBuiltin") @Cached IsBuiltinClassProfile isBuiltin,
0 commit comments