|
48 | 48 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageDelItemNodeGen;
|
49 | 49 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageForEachNodeGen;
|
50 | 50 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageGetItemNodeGen;
|
| 51 | +import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageGetItemWithHashNodeGen; |
51 | 52 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageGetIteratorNodeGen;
|
52 | 53 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageGetReverseIteratorNodeGen;
|
| 54 | +import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorKeyHashNodeGen; |
53 | 55 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorKeyNodeGen;
|
54 | 56 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorNextNodeGen;
|
55 | 57 | import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorValueNodeGen;
|
@@ -114,6 +116,11 @@ public static boolean mayHaveSideEffects(PHashingCollection wrapper) {
|
114 | 116 | @GenerateInline
|
115 | 117 | @GenerateCached(false)
|
116 | 118 | public abstract static class HashingStorageGetItemWithHash extends Node {
|
| 119 | + |
| 120 | + public static Object getItemWithHash(HashingStorage self, Object key, long keyHash) { |
| 121 | + return HashingStorageGetItemWithHashNodeGen.getUncached().execute(null, null, self, key, keyHash); |
| 122 | + } |
| 123 | + |
117 | 124 | public abstract Object execute(Frame frame, Node inliningTarget, HashingStorage self, Object key, long keyHash);
|
118 | 125 |
|
119 | 126 | @Specialization
|
@@ -479,6 +486,10 @@ public static void executeUncached(HashingStorage self, Object key, PHashingColl
|
479 | 486 | HashingStorageDelItemNodeGen.getUncached().executeWithAsserts(null, null, self, key, false, toUpdate);
|
480 | 487 | }
|
481 | 488 |
|
| 489 | + public static void delWithHash(EconomicMapStorage storage, Object key, long hash) { |
| 490 | + ObjectHashMapFactory.RemoveNodeGen.getUncached().execute(null, null, storage.map, key, hash); |
| 491 | + } |
| 492 | + |
482 | 493 | public final void execute(Node inliningTarget, HashingStorage self, TruffleString key, PHashingCollection toUpdate) {
|
483 | 494 | // Shortcut for frequent usage with TruffleString. We do not need a frame in such case,
|
484 | 495 | // because the string's __hash__ does not need it. Some fast-paths avoid even invoking
|
@@ -644,6 +655,10 @@ public static HashingStorageCopy create() {
|
644 | 655 | return HashingStorageCopyNodeGen.create();
|
645 | 656 | }
|
646 | 657 |
|
| 658 | + public static HashingStorage executeUncached(HashingStorage source) { |
| 659 | + return HashingStorageCopyNodeGen.getUncached().execute(null, source); |
| 660 | + } |
| 661 | + |
647 | 662 | public final HashingStorage executeCached(HashingStorage source) {
|
648 | 663 | return execute(this, source);
|
649 | 664 | }
|
@@ -997,6 +1012,11 @@ static Object keywords(KeywordsStorage self, HashingStorageIterator it) {
|
997 | 1012 | @GenerateCached(false)
|
998 | 1013 | @ImportStatic({PGuards.class})
|
999 | 1014 | public abstract static class HashingStorageIteratorKeyHash extends Node {
|
| 1015 | + |
| 1016 | + public static long executeUncached(HashingStorage storage, HashingStorageIterator it) { |
| 1017 | + return HashingStorageIteratorKeyHashNodeGen.getUncached().execute(null, storage, it); |
| 1018 | + } |
| 1019 | + |
1000 | 1020 | public abstract long execute(Node node, HashingStorage storage, HashingStorageIterator it);
|
1001 | 1021 |
|
1002 | 1022 | @Specialization
|
|
0 commit comments