|
72 | 72 | import com.oracle.graal.python.runtime.PythonContext;
|
73 | 73 | import com.oracle.graal.python.runtime.exception.PException;
|
74 | 74 | import com.oracle.graal.python.runtime.exception.PythonErrorType;
|
| 75 | +import com.oracle.graal.python.runtime.sequence.PSequence; |
75 | 76 | import com.oracle.truffle.api.CompilerDirectives;
|
76 | 77 | import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
|
77 | 78 | import com.oracle.truffle.api.dsl.Cached;
|
@@ -489,7 +490,15 @@ boolean isSuperSet(VirtualFrame frame, PBaseSet self, PBaseSet other,
|
489 | 490 | }
|
490 | 491 |
|
491 | 492 | @Specialization
|
492 |
| - boolean isSuperSet(VirtualFrame frame, PBaseSet self, String other, |
| 493 | + boolean isSuperSetPSequence(VirtualFrame frame, PBaseSet self, PSequence other, |
| 494 | + @Cached("create()") SetNodes.ConstructSetNode constructSetNode, |
| 495 | + @Cached("create()") HashingStorageNodes.KeysIsSupersetNode isSupersetNode) { |
| 496 | + PSet otherSet = constructSetNode.executeWith(frame, other); |
| 497 | + return isSupersetNode.execute(frame, self.getDictStorage(), otherSet.getDictStorage()); |
| 498 | + } |
| 499 | + |
| 500 | + @Specialization |
| 501 | + boolean isSuperSetString(VirtualFrame frame, PBaseSet self, String other, |
493 | 502 | @Cached("create()") SetNodes.ConstructSetNode constructSetNode,
|
494 | 503 | @Cached("create()") HashingStorageNodes.KeysIsSupersetNode isSupersetNode) {
|
495 | 504 | PSet otherSet = constructSetNode.executeWith(frame, other);
|
|
0 commit comments