Files
emacsd/elpa/skewer-mode-20180706.1807/cache-table.elc

85 lines
6.6 KiB
Plaintext
Raw Normal View History

2019-10-09 20:36:55 +02:00
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'cl-lib)
#@70 compiler-macro for inlining `cache-table-p'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'cache-table-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block cache-table-p (and (memq (type-of cl-x) cl-struct-cache-table-tags) t)) nil] 9 (#$ . 426)])
(put 'cache-table-p 'compiler-macro 'cache-table-p--cmacro)
#@13
(fn CL-X)
(defalias 'cache-table-p #[257 "\301!>\205 \302\207" [cl-struct-cache-table-tags type-of t] 3 (#$ . 765)])
(byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put cache-table-p side-effect-free error-free put cache-table cl-deftype-satisfies] 5)
#@80 compiler-macro for inlining `cache-table-expire-time'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'cache-table-expire-time--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block cache-table-expire-time (or (cache-table-p cl-x) (signal 'wrong-type-argument (list 'cache-table cl-x))) (aref cl-x 1)) nil] 9 (#$ . 1042)])
(put 'cache-table-expire-time 'compiler-macro 'cache-table-expire-time--cmacro)
#@105 Access slot "expire-time" of `(cache-table (:constructor cache-table--create))' struct CL-X.
(fn CL-X)
(defalias 'cache-table-expire-time #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-cache-table-tags type-of signal wrong-type-argument cache-table 1] 5 (#$ . 1471)])
(byte-code "\300\301\302\303#\300\207" [function-put cache-table-expire-time side-effect-free t] 4)
#@74 compiler-macro for inlining `cache-table-table'.
(fn CL-WHOLE-ARG CL-X)
(defalias 'cache-table-table--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block cache-table-table (or (cache-table-p cl-x) (signal 'wrong-type-argument (list 'cache-table cl-x))) (aref cl-x 2)) nil] 9 (#$ . 1866)])
(put 'cache-table-table 'compiler-macro 'cache-table-table--cmacro)
#@99 Access slot "table" of `(cache-table (:constructor cache-table--create))' struct CL-X.
(fn CL-X)
(defalias 'cache-table-table #[257 "\301!>\204\302\303\304D\"\210\211\305H\207" [cl-struct-cache-table-tags type-of signal wrong-type-argument cache-table 2] 5 (#$ . 2264)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put cache-table-table side-effect-free t defalias copy-cache-table copy-sequence] 4)
#@100 compiler-macro for inlining `cache-table--create'.
(fn CL-WHOLE &cl-quote &key EXPIRE-TIME TABLE)
(defalias 'cache-table--create--cmacro #[385 "\300\301\"A@\300\302\"A@\211\2037\211@\303>\203 \211AA\262\202 \304>A@\203.\305\262\202 \306\307@\"\210\202 \210\310\311\312\305\305&\207" [plist-member :expire-time :table (:expire-time :table :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:expire-time :table)" cl--defsubst-expand (expire-time table) (cl-block cache-table--create (record 'cache-table expire-time table))] 12 (#$ . 2692)])
(put 'cache-table--create 'compiler-macro 'cache-table--create--cmacro)
#@77 Constructor for objects of type `cache-table'.
(fn &key EXPIRE-TIME TABLE)
(defalias 'cache-table--create #[128 "\300\301\"A@\300\302\"A@\211\2037\211@\303>\203 \211AA\262\202 \304>A@\203.\305\262\202 \306\307@\"\210\202 \210\310\311#\207" [plist-member :expire-time :table (:expire-time :table :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:expire-time :table)" record cache-table] 7 (#$ . 3360)])
(byte-code "\300\301\302\303#\304\305\306\307\310\311\312\313\305\303& \207" [function-put cache-table--create side-effect-free t cl-struct-define cache-table "A cache table with expiring entries." cl-structure-object record nil ((cl-tag-slot) (expire-time) (table)) cl-struct-cache-table-tags] 11)
#@367 Create a new cache-table with entries automatically removed
from the table after EXPIRE-TIME seconds. This function accepts
the same keyword arguments as `make-hash-table'. Entries are not
actually removed from the cache-table until an access is made to
the cache-table.
Use `cache-table-get' to get and put (via setf) entries.
(fn EXPIRE-TIME &rest KEYWORD-ARGS)
(defalias 'cache-table-create #[385 "\300\301\302\303\304\"$\207" [cache-table--create :expire-time :table apply make-hash-table] 9 (#$ . 4115)])
#@64 Remove all expired entries from CACHE-TABLE.
(fn CACHE-TABLE)
(defalias 'cache-table-clear-expired #[257 "\301!>\204\302\303\304D\"\210\211\305H\301!>\204!\302\303\304D\"\210\306H\307 Z\310C\310C\311\312\313\314\315\316    $\317\"\320\321%\"\210\310\207" [cl-struct-cache-table-tags type-of signal wrong-type-argument cache-table 1 2 float-time nil maphash make-byte-code 514 "\302\240\210\303\302\242\302\211\242A\240\210\242\240\210\303\242\301W\205\304\300\"\207" vconcat vector [remhash] 6 "\n\n(fn KEY ENTRY)"] 16 (#$ . 4636)])
#@137 Access the value for KEY in CACHE-TABLE if it has not yet
expired. Behaves just like `gethash'.
(fn KEY CACHE-TABLE &optional DEFAULT)
(defalias 'cache-table-get #[770 "\301!\210\302\303!>\204\304\305\306D\"\210\307H\310B#A\207" [cl-struct-cache-table-tags cache-table-clear-expired gethash type-of signal wrong-type-argument cache-table 2 0] 9 (#$ . 5197)])
(byte-code "\300\301\302\303#\300\207" [function-put cache-table-get gv-expander #[385 "\300\301\302$\207" [gv--defsetter cache-table-get #[771 "\300\301D\302\303\304E\305DFE\207" [progn cache-table-clear-expired puthash cons (float-time) cache-table-table] 10 "Put an entry in the hash table, like (setf (gethash key table) value).\n\n(fn VALUE KEY CACHE-TABLE)"]] 7 "\n\n(fn DO &rest ARGS)"]] 4)
#@88 Like `maphash', call F for all non-expired entries in CACHE-TABLE.
(fn F CACHE-TABLE)
(defalias 'cache-table-map #[514 "\301!\210\302\303\304\305\306\307!\310\"\311\312%\313!>\204!\314\315\316D\"\210\317H\"\207" [cl-struct-cache-table-tags cache-table-clear-expired maphash make-byte-code 514 "\300A\"\207" vconcat vector [] 5 "\n\n(fn K V)" type-of signal wrong-type-argument cache-table 2] 9 (#$ . 5979)])
#@85 Like `hash-table-count', count the number of non-expired entries.
(fn CACHE-TABLE)
(defalias 'cache-table-count #[257 "\301\302!>\204\303\304\305D\"\210\306H!\207" [cl-struct-cache-table-tags hash-table-count type-of signal wrong-type-argument cache-table 2] 6 (#$ . 6404)])
(provide 'cache-table)