@@ -417,87 +417,6 @@ private boolean needsResize() {
417
417
return usedIndices + bucketsCntQuarter > getBucketsCount ();
418
418
}
419
419
420
- public static class GetProfiles extends Node {
421
- final ConditionProfile foundNullKey ;
422
- final ConditionProfile foundSameHashKey ;
423
- final ConditionProfile foundEqKey ;
424
- final ConditionProfile collisionFoundEqKey ;
425
- final ConditionProfile collisionFoundNoValue ;
426
- @ Child PyObjectRichCompareBool .EqNode eqNode ;
427
-
428
- public GetProfiles (boolean cached , PyObjectRichCompareBool .EqNode eqNode ) {
429
- if (cached ) {
430
- foundNullKey = ConditionProfile .createCountingProfile ();
431
- foundSameHashKey = ConditionProfile .createCountingProfile ();
432
- foundEqKey = ConditionProfile .createCountingProfile ();
433
- collisionFoundEqKey = ConditionProfile .createCountingProfile ();
434
- collisionFoundNoValue = ConditionProfile .createCountingProfile ();
435
- } else {
436
- foundNullKey = ConditionProfile .getUncached ();
437
- foundSameHashKey = ConditionProfile .getUncached ();
438
- foundEqKey = ConditionProfile .getUncached ();
439
- collisionFoundEqKey = ConditionProfile .getUncached ();
440
- collisionFoundNoValue = ConditionProfile .getUncached ();
441
- }
442
- this .eqNode = eqNode ;
443
- }
444
-
445
- public static GetProfiles create () {
446
- return new GetProfiles (true , PyObjectRichCompareBool .EqNode .create ());
447
- }
448
-
449
- private static final GetProfiles UNCACHED = new GetProfiles (false , PyObjectRichCompareBool .EqNode .getUncached ());
450
-
451
- public static GetProfiles getUncached () {
452
- return UNCACHED ;
453
- }
454
- }
455
-
456
- public static final class PutProfiles extends GetProfiles {
457
- final BranchProfile rehash1Profile ;
458
- final BranchProfile rehash2Profile ;
459
-
460
- public PutProfiles (boolean cached , PyObjectRichCompareBool .EqNode eqNode ) {
461
- super (cached , eqNode );
462
- if (cached ) {
463
- rehash1Profile = BranchProfile .create ();
464
- rehash2Profile = BranchProfile .create ();
465
- } else {
466
- rehash1Profile = BranchProfile .getUncached ();
467
- rehash2Profile = BranchProfile .getUncached ();
468
- }
469
- }
470
-
471
- public static PutProfiles create () {
472
- return new PutProfiles (true , PyObjectRichCompareBool .EqNode .create ());
473
- }
474
-
475
- private static final PutProfiles UNCACHED = new PutProfiles (false , PyObjectRichCompareBool .EqNode .getUncached ());
476
-
477
- public static PutProfiles getUncached () {
478
- return UNCACHED ;
479
- }
480
- }
481
-
482
- public static final class RemoveProfiles extends GetProfiles {
483
- final BranchProfile compactProfile ;
484
-
485
- public RemoveProfiles (boolean cached , PyObjectRichCompareBool .EqNode eqNode ) {
486
- super (cached , eqNode );
487
- compactProfile = cached ? BranchProfile .create () : BranchProfile .getUncached ();
488
- }
489
-
490
- public static RemoveProfiles create () {
491
- return new RemoveProfiles (true , PyObjectRichCompareBool .EqNode .create ());
492
- }
493
-
494
- private static final RemoveProfiles UNCACHED = new RemoveProfiles (false , PyObjectRichCompareBool .EqNode .getUncached ());
495
-
496
- public static RemoveProfiles getUncached () {
497
- return UNCACHED ;
498
- }
499
- }
500
-
501
420
public int size () {
502
421
return size ;
503
422
}
@@ -617,7 +536,7 @@ public static void doPut(ThreadState state, ObjectHashMap map, Object key, long
617
536
int searchLimit = map .getBucketsCount () + PERTURB_SHIFTS_COUT ;
618
537
int i = 0 ;
619
538
try {
620
- for (; CompilerDirectives . injectBranchProbability ( 0 , i < searchLimit ) ; i ++) {
539
+ for (; i < searchLimit ; i ++) {
621
540
perturb >>>= PERTURB_SHIFT ;
622
541
compactIndex = map .nextIndex (compactIndex , perturb );
623
542
index = map .indices [compactIndex ];
@@ -749,7 +668,7 @@ public static void doRemove(ThreadState state, ObjectHashMap map, Object key, lo
749
668
int searchLimit = map .getBucketsCount () + PERTURB_SHIFTS_COUT ;
750
669
int i = 0 ;
751
670
try {
752
- for (; CompilerDirectives . injectBranchProbability ( 0 , i < searchLimit ) ; i ++) {
671
+ for (; i < searchLimit ; i ++) {
753
672
perturb >>>= PERTURB_SHIFT ;
754
673
compactIndex = map .nextIndex (compactIndex , perturb );
755
674
index = map .indices [compactIndex ];
0 commit comments