Skip to content

Commit 4deedfb

Browse files
timfelmsimacek
authored andcommitted
add forgotten cached value
1 parent 24204dc commit 4deedfb

File tree

1 file changed

+2
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/ObjectBuiltins.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,10 @@ protected static int tsLen(TruffleString ts) {
404404
}
405405

406406
// Shortcut, only useful for interpreter performance, but doesn't hurt peak
407-
@Specialization(guards = {"keyObj == cachedKey", "tsLen(cachedKey) < 32"}, limit = "1")
407+
@Specialization(guards = {"keyObj == cachedKey", "cachedKeyLen < 32"}, limit = "1")
408408
protected Object doItTruffleString(VirtualFrame frame, Object object, @SuppressWarnings("unused") TruffleString keyObj,
409409
@SuppressWarnings("unused") @Cached("keyObj") TruffleString cachedKey,
410+
@SuppressWarnings("unused") @Cached("tsLen(cachedKey)") int cachedKeyLen,
410411
@Shared("getClassNode") @Cached GetClassNode getClassNode,
411412
@Cached("create(cachedKey)") LookupAttributeInMRONode lookup) {
412413
Object type = getClassNode.execute(object);

0 commit comments

Comments
 (0)