|
36 | 36 | import com.oracle.graal.python.nodes.PRaiseNode;
|
37 | 37 | import com.oracle.graal.python.nodes.attributes.LookupAttributeInMRONode;
|
38 | 38 | import com.oracle.graal.python.nodes.attributes.LookupInheritedAttributeNode;
|
39 |
| -import com.oracle.graal.python.nodes.call.special.CallUnaryMethodNode; |
40 | 39 | import com.oracle.graal.python.nodes.object.IsBuiltinClassProfile;
|
41 | 40 | import com.oracle.graal.python.nodes.util.CannotCastException;
|
42 | 41 | import com.oracle.graal.python.nodes.util.CastToJavaStringNode;
|
@@ -166,15 +165,15 @@ static int nativeStringMat(PString self, @SuppressWarnings("unused") ThreadState
|
166 | 165 |
|
167 | 166 | @Specialization(replaces = {"string", "lazyString", "nativeString", "nativeStringMat"})
|
168 | 167 | static int subclassedString(PString self, ThreadState state,
|
169 |
| - @Exclusive @Cached("createBinaryProfile()") ConditionProfile gotState, |
170 |
| - @Exclusive @Cached("createBinaryProfile()") ConditionProfile hasLen, |
171 |
| - @Exclusive @Cached("createBinaryProfile()") ConditionProfile ltZero, |
172 |
| - @Exclusive @Cached LookupInheritedAttributeNode.Dynamic getLenNode, |
173 |
| - @Exclusive @Cached CallUnaryMethodNode callNode, |
174 |
| - @Exclusive @Cached PRaiseNode raiseNode, |
| 168 | + @CachedLibrary("self") PythonObjectLibrary plib, |
| 169 | + @Shared("methodLib") @CachedLibrary(limit = "2") PythonObjectLibrary methodLib, |
| 170 | + @Shared("gotState") @Cached ConditionProfile gotState, |
| 171 | + @Exclusive @Cached ConditionProfile hasLen, |
| 172 | + @Exclusive @Cached ConditionProfile ltZero, |
| 173 | + @Shared("raise") @Cached PRaiseNode raiseNode, |
175 | 174 | @Exclusive @CachedLibrary(limit = "1") PythonObjectLibrary lib) {
|
176 | 175 | // call the generic implementation in the superclass
|
177 |
| - return self.lengthWithState(state, gotState, hasLen, ltZero, getLenNode, callNode, raiseNode, lib); |
| 176 | + return self.lengthWithState(state, plib, methodLib, gotState, hasLen, ltZero, raiseNode, lib); |
178 | 177 | }
|
179 | 178 | }
|
180 | 179 |
|
|
0 commit comments