Lines Matching refs:ep
327 register PyDictEntry *ep; in lookdict() local
332 ep = &ep0[i]; in lookdict()
333 if (ep->me_key == NULL || ep->me_key == key) in lookdict()
334 return ep; in lookdict()
336 if (ep->me_key == dummy) in lookdict()
337 freeslot = ep; in lookdict()
339 if (ep->me_hash == hash) { in lookdict()
340 startkey = ep->me_key; in lookdict()
346 if (ep0 == mp->ma_table && ep->me_key == startkey) { in lookdict()
348 return ep; in lookdict()
366 ep = &ep0[i & mask]; in lookdict()
367 if (ep->me_key == NULL) in lookdict()
368 return freeslot == NULL ? ep : freeslot; in lookdict()
369 if (ep->me_key == key) in lookdict()
370 return ep; in lookdict()
371 if (ep->me_hash == hash && ep->me_key != dummy) { in lookdict()
372 startkey = ep->me_key; in lookdict()
378 if (ep0 == mp->ma_table && ep->me_key == startkey) { in lookdict()
380 return ep; in lookdict()
391 else if (ep->me_key == dummy && freeslot == NULL) in lookdict()
392 freeslot = ep; in lookdict()
415 register PyDictEntry *ep; in lookdict_string() local
429 ep = &ep0[i]; in lookdict_string()
430 if (ep->me_key == NULL || ep->me_key == key) in lookdict_string()
431 return ep; in lookdict_string()
432 if (ep->me_key == dummy) in lookdict_string()
433 freeslot = ep; in lookdict_string()
435 if (ep->me_hash == hash && _PyString_Eq(ep->me_key, key)) in lookdict_string()
436 return ep; in lookdict_string()
444 ep = &ep0[i & mask]; in lookdict_string()
445 if (ep->me_key == NULL) in lookdict_string()
446 return freeslot == NULL ? ep : freeslot; in lookdict_string()
447 if (ep->me_key == key in lookdict_string()
448 || (ep->me_hash == hash in lookdict_string()
449 && ep->me_key != dummy in lookdict_string()
450 && _PyString_Eq(ep->me_key, key))) in lookdict_string()
451 return ep; in lookdict_string()
452 if (ep->me_key == dummy && freeslot == NULL) in lookdict_string()
453 freeslot = ep; in lookdict_string()
486 PyDictEntry *ep; in _PyDict_MaybeUntrack() local
492 ep = mp->ma_table; in _PyDict_MaybeUntrack()
495 if ((value = ep[i].me_value) == NULL) in _PyDict_MaybeUntrack()
498 _PyObject_GC_MAY_BE_TRACKED(ep[i].me_key)) in _PyDict_MaybeUntrack()
511 PyDictEntry *ep, PyObject *value) in insertdict_by_entry() argument
516 if (ep->me_value != NULL) { in insertdict_by_entry()
517 old_value = ep->me_value; in insertdict_by_entry()
518 ep->me_value = value; in insertdict_by_entry()
523 if (ep->me_key == NULL) in insertdict_by_entry()
526 assert(ep->me_key == dummy); in insertdict_by_entry()
529 ep->me_key = key; in insertdict_by_entry()
530 ep->me_hash = (Py_ssize_t)hash; in insertdict_by_entry()
531 ep->me_value = value; in insertdict_by_entry()
547 register PyDictEntry *ep; in insertdict() local
550 ep = mp->ma_lookup(mp, key, hash); in insertdict()
551 if (ep == NULL) { in insertdict()
556 return insertdict_by_entry(mp, key, hash, ep, value); in insertdict()
575 register PyDictEntry *ep; in insertdict_clean() local
579 ep = &ep0[i]; in insertdict_clean()
580 for (perturb = hash; ep->me_key != NULL; perturb >>= PERTURB_SHIFT) { in insertdict_clean()
582 ep = &ep0[i & mask]; in insertdict_clean()
584 assert(ep->me_value == NULL); in insertdict_clean()
586 ep->me_key = key; in insertdict_clean()
587 ep->me_hash = (Py_ssize_t)hash; in insertdict_clean()
588 ep->me_value = value; in insertdict_clean()
601 PyDictEntry *oldtable, *newtable, *ep; in dictresize() local
661 for (ep = oldtable; i > 0; ep++) { in dictresize()
662 if (ep->me_value != NULL) { /* active entry */ in dictresize()
664 insertdict_clean(mp, ep->me_key, (long)ep->me_hash, in dictresize()
665 ep->me_value); in dictresize()
667 else if (ep->me_key != NULL) { /* dummy entry */ in dictresize()
669 assert(ep->me_key == dummy); in dictresize()
670 Py_DECREF(ep->me_key); in dictresize()
712 PyDictEntry *ep; in PyDict_GetItem() local
736 ep = (mp->ma_lookup)(mp, key, hash); in PyDict_GetItem()
739 if (ep == NULL) in PyDict_GetItem()
743 ep = (mp->ma_lookup)(mp, key, hash); in PyDict_GetItem()
744 if (ep == NULL) { in PyDict_GetItem()
749 return ep->me_value; in PyDict_GetItem()
761 PyDictEntry *ep; in _PyDict_GetItemWithError() local
775 ep = (mp->ma_lookup)(mp, key, hash); in _PyDict_GetItemWithError()
776 if (ep == NULL) { in _PyDict_GetItemWithError()
779 return ep->me_value; in _PyDict_GetItemWithError()
784 long hash, PyDictEntry *ep, PyObject *value) in dict_set_item_by_hash_or_entry() argument
794 if (ep == NULL) { in dict_set_item_by_hash_or_entry()
799 if (insertdict_by_entry(mp, key, hash, ep, value) != 0) in dict_set_item_by_hash_or_entry()
856 register PyDictEntry *ep; in PyDict_DelItem() local
871 ep = (mp->ma_lookup)(mp, key, hash); in PyDict_DelItem()
872 if (ep == NULL) in PyDict_DelItem()
874 if (ep->me_value == NULL) { in PyDict_DelItem()
878 old_key = ep->me_key; in PyDict_DelItem()
880 ep->me_key = dummy; in PyDict_DelItem()
881 old_value = ep->me_value; in PyDict_DelItem()
882 ep->me_value = NULL; in PyDict_DelItem()
893 PyDictEntry *ep, *table; in PyDict_Clear() local
938 for (ep = table; fill > 0; ++ep) { in PyDict_Clear()
943 if (ep->me_key) { in PyDict_Clear()
945 Py_DECREF(ep->me_key); in PyDict_Clear()
946 Py_XDECREF(ep->me_value); in PyDict_Clear()
950 assert(ep->me_value == NULL); in PyDict_Clear()
978 register PyDictEntry *ep; in PyDict_Next() local
985 ep = ((PyDictObject *)op)->ma_table; in PyDict_Next()
987 while (i <= mask && ep[i].me_value == NULL) in PyDict_Next()
993 *pkey = ep[i].me_key; in PyDict_Next()
995 *pvalue = ep[i].me_value; in PyDict_Next()
1005 register PyDictEntry *ep; in _PyDict_Next() local
1012 ep = ((PyDictObject *)op)->ma_table; in _PyDict_Next()
1014 while (i <= mask && ep[i].me_value == NULL) in _PyDict_Next()
1019 *phash = (long)(ep[i].me_hash); in _PyDict_Next()
1021 *pkey = ep[i].me_key; in _PyDict_Next()
1023 *pvalue = ep[i].me_value; in _PyDict_Next()
1032 register PyDictEntry *ep; in dict_dealloc() local
1036 for (ep = mp->ma_table; fill > 0; ep++) { in dict_dealloc()
1037 if (ep->me_key) { in dict_dealloc()
1039 Py_DECREF(ep->me_key); in dict_dealloc()
1040 Py_XDECREF(ep->me_value); in dict_dealloc()
1074 PyDictEntry *ep = mp->ma_table + i; in dict_print() local
1075 PyObject *pvalue = ep->me_value; in dict_print()
1085 if (PyObject_Print((PyObject *)ep->me_key, fp, 0)!=0) { in dict_print()
1198 PyDictEntry *ep; in dict_subscript() local
1206 ep = (mp->ma_lookup)(mp, key, hash); in dict_subscript()
1207 if (ep == NULL) in dict_subscript()
1209 v = ep->me_value; in dict_subscript()
1255 PyDictEntry *ep; in dict_keys() local
1270 ep = mp->ma_table; in dict_keys()
1273 if (ep[i].me_value != NULL) { in dict_keys()
1274 PyObject *key = ep[i].me_key; in dict_keys()
1289 PyDictEntry *ep; in dict_values() local
1304 ep = mp->ma_table; in dict_values()
1307 if (ep[i].me_value != NULL) { in dict_values()
1308 PyObject *value = ep[i].me_value; in dict_values()
1325 PyDictEntry *ep; in dict_items() local
1352 ep = mp->ma_table; in dict_items()
1355 if ((value=ep[i].me_value) != NULL) { in dict_items()
1356 key = ep[i].me_key; in dict_items()
1941 PyDictEntry *ep; in dict_contains() local
1949 ep = (mp->ma_lookup)(mp, key, hash); in dict_contains()
1950 if (ep == NULL) in dict_contains()
1952 return PyBool_FromLong(ep->me_value != NULL); in dict_contains()
1971 PyDictEntry *ep; in dict_get() local
1982 ep = (mp->ma_lookup)(mp, key, hash); in dict_get()
1983 if (ep == NULL) in dict_get()
1985 val = ep->me_value; in dict_get()
2000 PyDictEntry *ep; in dict_setdefault() local
2011 ep = (mp->ma_lookup)(mp, key, hash); in dict_setdefault()
2012 if (ep == NULL) in dict_setdefault()
2014 val = ep->me_value; in dict_setdefault()
2016 if (dict_set_item_by_hash_or_entry((PyObject*)mp, key, hash, ep, in dict_setdefault()
2036 PyDictEntry *ep; in dict_pop() local
2056 ep = (mp->ma_lookup)(mp, key, hash); in dict_pop()
2057 if (ep == NULL) in dict_pop()
2059 if (ep->me_value == NULL) { in dict_pop()
2067 old_key = ep->me_key; in dict_pop()
2069 ep->me_key = dummy; in dict_pop()
2070 old_value = ep->me_value; in dict_pop()
2071 ep->me_value = NULL; in dict_pop()
2081 PyDictEntry *ep; in dict_popitem() local
2108 ep = &mp->ma_table[0]; in dict_popitem()
2109 if (ep->me_value == NULL) { in dict_popitem()
2110 i = ep->me_hash; in dict_popitem()
2118 while ((ep = &mp->ma_table[i])->me_value == NULL) { in dict_popitem()
2124 PyTuple_SET_ITEM(res, 0, ep->me_key); in dict_popitem()
2125 PyTuple_SET_ITEM(res, 1, ep->me_value); in dict_popitem()
2127 ep->me_key = dummy; in dict_popitem()
2128 ep->me_value = NULL; in dict_popitem()
2314 PyDictEntry *ep; in PyDict_Contains() local
2322 ep = (mp->ma_lookup)(mp, key, hash); in PyDict_Contains()
2323 return ep == NULL ? -1 : (ep->me_value != NULL); in PyDict_Contains()
2331 PyDictEntry *ep; in _PyDict_Contains() local
2333 ep = (mp->ma_lookup)(mp, key, hash); in _PyDict_Contains()
2334 return ep == NULL ? -1 : (ep->me_value != NULL); in _PyDict_Contains()
2559 register PyDictEntry *ep; in dictiter_iternextkey() local
2576 ep = d->ma_table; in dictiter_iternextkey()
2578 while (i <= mask && ep[i].me_value == NULL) in dictiter_iternextkey()
2584 key = ep[i].me_key; in dictiter_iternextkey()
2631 register PyDictEntry *ep; in dictiter_iternextvalue() local
2649 ep = d->ma_table; in dictiter_iternextvalue()
2650 while ((value=ep[i].me_value) == NULL) { in dictiter_iternextvalue()
2703 register PyDictEntry *ep; in dictiter_iternextitem() local
2720 ep = d->ma_table; in dictiter_iternextitem()
2722 while (i <= mask && ep[i].me_value == NULL) in dictiter_iternextitem()
2738 key = ep[i].me_key; in dictiter_iternextitem()
2739 value = ep[i].me_value; in dictiter_iternextitem()