;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib eieio eieio-base] 2)#@45 The current version of the registry format.
(defvar registry-db-version 0.2 (#$ . 173))
(byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias registry-db-p eieio-make-class-predicate registry-db registry-db--eieio-childp eieio-make-child-predicate registry-db-child-p make-obsolete "use (cl-typep ... 'registry-db) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (eieio-persistent) ((version :initarg :version :initform nil :type (or null float) :documentation "The registry version.") (max-size :initarg :max-size :initform (symbol-value 'most-positive-fixnum) :type integer :custom integer :documentation "The maximum number of registry entries.") (prune-factor :initarg :prune-factor :initform 0.1 :type float :custom float :documentation "Prune to (:max-size * :prune-factor) less\n    than the :max-size limit.  Should be a float between 0 and 1.") (tracked :initarg :tracked :initform nil :type t :documentation "The tracked (indexed) fields, a list of symbols.") (precious :initarg :precious :initform nil :type t :documentation "The precious fields, a list of symbols.") (tracker :initarg :tracker :type hash-table :documentation "The field tracking hash table.") (data :initarg :data :type hash-table :documentation "The data hash table.")) nil] 6)#@68 Create a new object of class type `registry-db'.

(fn &rest SLOTS)
(defalias 'registry-db #[128 "\300\301\302#\207" [apply make-instance registry-db] 5 (#$ . 1565)])
(byte-code "\300\301\302\303#\300\207" [function-put registry-db compiler-macro registry-db--anon-cmacro] 4)#@26 

(fn WHOLE &rest SLOTS)
(defalias 'registry-db--anon-cmacro #[385 "\211@;\204 \207\300\301\302@@#@\303@DABB\304\211@%\207" [macroexp-warn-and-return format "Obsolete name arg %S to constructor %S" identity nil] 8 (#$ . 1846)])
(byte-code "\300\301\302\303\304\305%\210\300\301\306\307\304\310%\210\300\311\304\312\304\313%\210\300\314\304\315\304\316%\210\300\317\304\320\304\321%\210\300\322\304\323\304\324%\207" [cl-generic-define-method initialize-instance (:before) ((_this registry-db) slots) nil #[514 "\301\302\"\205 \303\302\"\211\203 \304\305\"\205M \306\307\303\310\"#\262\306\302#\262@\310=\2036 AA\262\202; \311\310\"\210@\312=\203I AA\262\313\207\311\312\"\207" [registry-db-version plist-member :version plist-get eql 0.1 plist-put :max-size :max-hard cl--do-remf :max-soft t] 9 "Check whether a registry object needs to be upgraded.\n\n(fn THIS SLOTS)"] (:after) ((this registry-db) slots) #[514 "\300>\204 \301\302\303\304\305\306\307\310\311&#\210\312>?\205% \301\313\303\304\314\306\307$#\207" [:data eieio-oset data make-hash-table :size 10000 :rehash-size 2.0 :test equal :tracker tracker 100] 12 "Set value of data slot of THIS after initialization.\n\n(fn THIS SLOTS)"] registry-lookup ((db registry-db) keys) #[514 "\300\301\"\302\303\304\305\306\"\"\"\207" [eieio-oref data delq nil mapcar make-closure #[257 "\301\300\"\205 \211\301\300\"D\207" [V0 gethash] 5 "\n\n(fn K)"]] 9 "Search for KEYS in the registry-db DB.\nReturns an alist of the key followed by the entry in a list, not a cons cell.\n\n(fn DB KEYS)"] registry-lookup-breaks-before-lexbind ((db registry-db) keys) #[514 "\300\301\"\302\303\303\211:\203, @\262\304\"\203% \304\"DB\262A\262\202	 \211\237\266\203\"\207" [eieio-oref data delq nil gethash] 12 "Search for KEYS in the registry-db DB.\nReturns an alist of the key followed by the entry in a list, not a cons cell.\n\n(fn DB KEYS)"] registry-lookup-secondary ((db registry-db) tracksym &optional create) #[770 "\300\301\302\"\"\211\206) \205) \303\304\305\306\307\310\311\312&\301\302\"#\210\300\301\302\"\"\207" [gethash eieio-oref tracker puthash make-hash-table :size 800 :rehash-size 2.0 :test equal] 13 "Search for TRACKSYM in the registry-db DB.\nWhen CREATE is not nil, create the secondary index hash table if needed.\n\n(fn DB TRACKSYM &optional CREATE)"] registry-lookup-secondary-value ((db registry-db) tracksym val &optional set) #[1027 "\211\204 \300\"\205+ \211\203\" \301\302=?\205 \300\302##\210\303\300\"\"\207" [registry-lookup-secondary puthash t gethash] 11 "Search for TRACKSYM with value VAL in the registry-db DB.\nWhen SET is not nil, set it for VAL (use t for an empty list).\n\n(fn DB TRACKSYM VAL &optional SET)"]] 6)#@30 

(fn MODE ENTRY CHECK-LIST)
(defalias 'registry--match #[771 "\211\205T \211@@@\243\300\203E \203E \211\204E \301\267\202; \242\302\"\243\235\202< \303@\304\305\302\n\"\243\306#\"\202< \300\262\243\262\202 \211\206R \307\243#\266\203\207" [nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:member 29 :regex 41)) assoc string-match mapconcat prin1-to-string " " registry--match] 13 (#$ . 4627)])
(byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\300\310\302\311\302\312%\210\300\313\302\314\302\315%\210\300\316\302\317\302\320%\210\300\321\302\322\302\323%\210\300\324\302\325\302\326%\210\300\327\302\330\302\331%\210\332\333!\207" [cl-generic-define-method registry-search nil ((db registry-db) &rest spec) #[385 "\205* \300\301\"\300\302\"\300\303\"\304C\305\306\307	%\310\311\"\"\210\211\242\237\262\266\203\207" [plist-get :all :member :regex nil maphash make-closure #[514 "\303\204 \302\203 \304\305\302#\204 \301\205\" \304\306\301#\205\" \300\300\242B\240\207" [V0 V1 V2 V3 registry--match :member :regex] 6 "\n\n(fn K V)"] eieio-oref data] 13 "Search for SPEC across the registry-db DB.\nFor example calling with `:member \\='(a 1 2)' will match entry ((a 3 1)).\nCalling with `:all t' (any non-nil value) will match all.\nCalling with `:regex \\='(a \"h.llo\")' will match entry (a \"hullo\" \"bye\").\nThe test order is to check :all first, then :member, then :regex.\n\n(fn DB &rest SPEC)"] registry-delete ((db registry-db) keys assert &rest spec) #[899 "\300\301\"\206 \302\303#\300\304\"\211\203\206 \211@\305\"\2030 \211\2040 \306\307\310\311C$\210\211\203w \211@\312\f\"\203p \211\236\243\211\203o \211@\313#\235\203g \313\314\"\206e \315$\210\210A\266\202\202C \210A\266\202\2021 \210\316\"\266A\266\202\202 \210\207" [eieio-oref data apply registry-search tracked gethash cl--assertion-failed entry "Key %s does not exist in database" nil registry-lookup-secondary registry-lookup-secondary-value delete t remhash] 22 "Delete KEYS from the registry-db DB.\nIf KEYS is nil, use SPEC to do a search.\nUpdates the secondary ('tracked') indices as well.\nWith assert non-nil, errors out if the key does not exist already.\n\n(fn DB KEYS ASSERT &rest SPEC)"] registry-size ((db registry-db)) #[257 "\300\301\302\"!\207" [hash-table-count eieio-oref data] 5 "Return the size of the registry-db object DB.\nThis is the key count of the `data' slot.\n\n(fn DB)"] registry-full ((db registry-db)) #[257 "\300!\301\302\"Y\207" [registry-size eieio-oref max-size] 5 "Check if registry-db DB is full.\n\n(fn DB)"] registry-insert ((db registry-db) key entry) #[771 "\300\301\302\"\"\203 \303\304\305\306\211$\210\307!\203 \303\310\311\306\211$\210\312\301\302\"#\210\301\313\"\211\203k \211@\211\236\243\211\203c \211@\314#\235\203M \211\202Q B\262\314$\266A\266\202\2026 \210A\266\202\202, \210\207" [gethash eieio-oref data cl--assertion-failed (not (gethash key (oref db data))) "Key already exists in database" nil registry-full (not (registry-full db)) "registry max-size limit reached" puthash tracked registry-lookup-secondary-value] 13 "Insert ENTRY under KEY into the registry-db DB.\nUpdates the secondary ('tracked') indices as well.\nErrors out if the key exists already.\n\n(fn DB KEY ENTRY)"] registry-reindex ((db registry-db)) #[257 "\300C\301\302\"G\303!_\301\302\"\211\205. \211@\304\305\306\n%\301\307\"\"\210A\266\202\202 \207" [0 eieio-oref tracked registry-size maphash make-closure #[514 "\302\211\242T\240\210\304\301W\203# \305\302\242\306\"\304U\203# \307\310\302\242\301\311\302\242_\301\245$\210\300\236\243\211\205F \211@\312\303\300#B\262\312\303\300$\266A\266\202\202' \207" [V0 V1 V2 V3 0 mod 1000 message "reindexing: %d of %d (%.2f%%)" 100.0 registry-lookup-secondary-value] 10 "\n\n(fn KEY V)"] data] 12 "Rebuild the secondary indices of registry-db DB.\n\n(fn DB)"] registry-prune ((db registry-db) &optional sortfunc) #[513 "\300!\301\302\303\"\302\303\"\302\304\"_Z!\305\306!\203, \307Z#\262\310\305#G\207\311\207" [registry-size floor eieio-oref max-size prune-factor nil registry-full registry-collect-prune-candidates registry-delete 0] 9 "Prune the registry-db object DB.\n\nAttempts to prune the number of entries down to (*\n:max-size :prune-factor) less than the max-size limit, so\npruning doesn't need to happen on every save.  Removes only\nentries without the :precious keys, so it may not be possible to\nreach the target limit.\n\nEntries to be pruned are first sorted using SORTFUNC.  Entries\nfrom the front of the list are deleted first.\n\nReturns the number of deleted entries.\n\n(fn DB &optional SORTFUNC)"] registry-collect-prune-candidates ((db registry-db) limit sortfunc) #[771 "\300\301\"\302\303\"\300\304\"\305C\306\302\307#\"\210\211\242\237\262\203( \310\"\262\311\312\313\"\314G^#\207" [eieio-oref precious make-closure #[257 "\211\242\300>\207" [V0] 3 "\n\n(fn ENTRY-KEY)"] data nil maphash #[514 "\211<\205 \301\302\303\304$?\266\203\205 \300B\300\242B\240\207" [V0 V1 nil apply cl-some] 10 "\n\n(fn K V)"] sort cl-subseq mapcar car 0] 12 "Collect pruning candidates from the registry-db object DB.\n\nProposes only entries without the :precious keys, and attempts to\nreturn LIMIT such candidates.  If SORTFUNC is provided, sort\nentries first and return candidates from beginning of list.\n\n(fn DB LIMIT SORTFUNC)"] provide registry] 6)
