|
44 | 44 | import com.oracle.graal.python.builtins.Python3Core; |
45 | 45 | import com.oracle.graal.python.builtins.PythonBuiltinClassType; |
46 | 46 | import com.oracle.graal.python.builtins.objects.PNone; |
47 | | -import com.oracle.graal.python.builtins.objects.str.StringUtils; |
48 | 47 | import com.oracle.graal.python.builtins.objects.type.MroShape; |
49 | 48 | import com.oracle.graal.python.builtins.objects.type.MroShape.MroShapeLookupResult; |
50 | 49 | import com.oracle.graal.python.builtins.objects.type.PythonAbstractClass; |
|
56 | 55 | import com.oracle.graal.python.runtime.PythonOptions; |
57 | 56 | import com.oracle.graal.python.runtime.exception.StacktracelessCheckedException; |
58 | 57 | import com.oracle.graal.python.runtime.sequence.storage.MroSequenceStorage; |
| 58 | +import com.oracle.graal.python.util.PythonUtils; |
59 | 59 | import com.oracle.truffle.api.Assumption; |
60 | 60 | import com.oracle.truffle.api.CompilerAsserts; |
61 | 61 | import com.oracle.truffle.api.CompilerDirectives; |
@@ -93,16 +93,17 @@ public final Object execute(Object klass) { |
93 | 93 |
|
94 | 94 | protected abstract Object executeInternal(Object klass) throws MROChangedException; |
95 | 95 |
|
| 96 | + @ImportStatic(PythonUtils.class) |
96 | 97 | @GenerateUncached |
97 | | - @GenerateInline(false) // footprint reduction 36 -> 17 |
| 98 | + @GenerateInline(false) |
98 | 99 | public abstract static class Dynamic extends PNodeWithContext { |
99 | 100 | public abstract Object execute(Object klass, TruffleString key); |
100 | 101 |
|
101 | | - @Specialization(guards = "equalNode.execute(inliningTarget, key, cachedKey)", limit = "2") |
| 102 | + @Specialization(guards = "equalNode.execute(key, cachedKey, TS_ENCODING)", limit = "2") |
102 | 103 | static Object lookupConstantMROEquals(Object klass, TruffleString key, |
103 | 104 | @Bind Node inliningTarget, |
104 | 105 | @Cached("key") TruffleString cachedKey, |
105 | | - @Cached @Shared StringUtils.EqualNode equalNode, |
| 106 | + @Cached @Shared TruffleString.EqualNode equalNode, |
106 | 107 | @Cached("create(cachedKey)") LookupAttributeInMRONode lookup) { |
107 | 108 | return lookup.execute(klass); |
108 | 109 | } |
|
0 commit comments