Stefan Monnier
9830421e96
comp-cstr.el: Fix a minor error and prepare for upcoming changes
...
* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy): Add `atom`
and `t` only to those types whose "allparents" is clearly not complete.
(comp--compute--pred-type-h): Store the cstr rather than the type
in the hash-table, as expected by `comp--pred-to-cstr`.
2024-03-08 02:03:55 -05:00
Andrea Corallo
1fbe56c327
Merge remote-tracking branch 'origin/master' into 'feature/type-hierarchy'
2024-02-28 20:47:57 +01:00
Andrea Corallo
5aeea8dc2c
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Rename constructors.
2024-02-21 17:42:58 +01:00
Eli Zaretskii
e6dae47d71
Merge from origin/emacs-29
...
45f9af61b8
Remove references to phst@google.com .
7256690a3c
* BUGS: Note how to report critical security issues.
1035669b38
Add cross-reference to ELisp manual Caveats
61a1450762
Improve directory prompt used by package-vc-checkout
0c7c8210cb
Minor Tramp doc adaption
df243f785d
Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
17a395e04c
;; Fix typo in the Tramp documentation
614b244a7f
* Improve reproducibility of inferred values by native comp
9f9da26e0d
Handle typescript ts grammar breaking change for function...
717d8c4285
Don't quote 't' in doc strings
2024-02-17 04:54:48 -05:00
Andrea Corallo
aa84998489
* make use of 'cl--direct-supertypes-of-type' in the native-compiler
...
* lisp/emacs-lisp/comp-cstr.el (comp--direct-supertypes): Use
cl--direct-supertypes-of-type.
2024-02-15 16:48:36 +01:00
Andrea Corallo
614b244a7f
* Improve reproducibility of inferred values by native comp
...
* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Do not try to
reorder conses using 'sxhash-equal' as its behavior is not reproducible
over different sessions.
2024-02-11 11:15:27 +01:00
Stefan Kangas
9364c28959
; Fix typos in symbol names
2024-01-21 15:28:06 +01:00
Po Lu
ecf08f0621
Merge from savannah/emacs-29
...
dc4e6b1329
; Update copyright years in more files
64b3777631
; Run set-copyright from admin.el
8e1c56ae46
; Add 2024 to copyright years
# Conflicts:
# doc/misc/modus-themes.org
# doc/misc/texinfo.tex
# etc/NEWS
# etc/refcards/ru-refcard.tex
# etc/themes/modus-operandi-theme.el
# etc/themes/modus-themes.el
# etc/themes/modus-vivendi-theme.el
# lib/alloca.in.h
# lib/binary-io.h
# lib/c-ctype.h
# lib/c-strcasecmp.c
# lib/c-strncasecmp.c
# lib/careadlinkat.c
# lib/cloexec.c
# lib/close-stream.c
# lib/diffseq.h
# lib/dup2.c
# lib/filemode.h
# lib/fpending.c
# lib/fpending.h
# lib/fsusage.c
# lib/getgroups.c
# lib/getloadavg.c
# lib/gettext.h
# lib/gettime.c
# lib/gettimeofday.c
# lib/group-member.c
# lib/malloc.c
# lib/md5-stream.c
# lib/md5.c
# lib/md5.h
# lib/memmem.c
# lib/memrchr.c
# lib/nanosleep.c
# lib/save-cwd.h
# lib/sha1.c
# lib/sig2str.c
# lib/stdlib.in.h
# lib/strtoimax.c
# lib/strtol.c
# lib/strtoll.c
# lib/time_r.c
# lib/xalloc-oversized.h
# lisp/auth-source-pass.el
# lisp/emacs-lisp/lisp-mnt.el
# lisp/emacs-lisp/timer.el
# lisp/info-look.el
# lisp/jit-lock.el
# lisp/loadhist.el
# lisp/mail/rmail.el
# lisp/net/ntlm.el
# lisp/net/webjump.el
# lisp/progmodes/asm-mode.el
# lisp/progmodes/project.el
# lisp/progmodes/sh-script.el
# lisp/textmodes/flyspell.el
# lisp/textmodes/reftex-toc.el
# lisp/textmodes/reftex.el
# lisp/textmodes/tex-mode.el
# lisp/url/url-gw.el
# m4/alloca.m4
# m4/clock_time.m4
# m4/d-type.m4
# m4/dirent_h.m4
# m4/dup2.m4
# m4/euidaccess.m4
# m4/fchmodat.m4
# m4/filemode.m4
# m4/fsusage.m4
# m4/getgroups.m4
# m4/getloadavg.m4
# m4/getrandom.m4
# m4/gettime.m4
# m4/gettimeofday.m4
# m4/gnulib-common.m4
# m4/group-member.m4
# m4/inttypes.m4
# m4/malloc.m4
# m4/manywarnings.m4
# m4/mempcpy.m4
# m4/memrchr.m4
# m4/mkostemp.m4
# m4/mktime.m4
# m4/nproc.m4
# m4/nstrftime.m4
# m4/pathmax.m4
# m4/pipe2.m4
# m4/pselect.m4
# m4/pthread_sigmask.m4
# m4/readlink.m4
# m4/realloc.m4
# m4/sig2str.m4
# m4/ssize_t.m4
# m4/stat-time.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/stdio_h.m4
# m4/stdlib_h.m4
# m4/stpcpy.m4
# m4/strnlen.m4
# m4/strtoimax.m4
# m4/strtoll.m4
# m4/time_h.m4
# m4/timegm.m4
# m4/timer_time.m4
# m4/timespec.m4
# m4/unistd_h.m4
# m4/warnings.m4
# nt/configure.bat
# nt/preprep.c
# test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46
; Add 2024 to copyright years
2024-01-02 09:47:10 +08:00
Eli Zaretskii
486094126b
Merge from origin/emacs-29
...
0f361cc985
; Minor copyedits in description of ':box' face property
46fe7a17f5
Fix dragging mode line on text terminals with a mouse (bu...
12daf386f3
; * doc/lispref/processes.texi (Network): Fix wording and...
037d858dc1
(rust-ts-mode): Set electric-indent-chars
dc9b733ab8
js-ts-mode: Highlight function parameters inside destruct...
4a72f13bdf
js-ts-mode: Highlight property shorthands in assignments
83ed9018ed
(js--treesit-font-lock-settings): Highlight parameters in...
ad0f87bb4c
(js--treesit-font-lock-settings): Remove some duplicates
71c5f3694f
; Another fix of doc string of 'message-mail-user-agent' ...
04a39353ba
; * lisp/gnus/message.el (message-mail-user-agent): Doc f...
82ddcf37ec
; * doc/lispref/files.texi (Changing Files): Fix last cha...
89068516b3
Don't claim to signal an error when deleting a nonexistin...
4fd254e183
* lisp/indent.el (indent-rigidly): Improve prompt (bug#67...
5f923ff1a6
; Fix typos
a1f88963f5
rust-ts-mode--comment-docstring: Handle block doc comments
a547b0e2e8
rust-ts-mode--comment-docstring: Fix/improve the previous...
2023-12-09 07:25:21 -05:00
Stefan Kangas
5f923ff1a6
; Fix typos
2023-12-03 23:31:30 +01:00
Andrea Corallo
6218278a67
* lisp/emacs-lisp/comp-cstr.el (comp--direct-supertype): Remove unused.
2023-11-03 19:03:51 +01:00
Stefan Monnier
b93f931e9e
lisp/emacs-lisp/comp-cstr.el: Fix bootstrap
...
* lisp/emacs-lisp/comp-cstr.el: Remove redundant require of `cl-macs`
and add missing require of `cl-extra`.
* lisp/emacs-lisp/cl-generic.el: Improve warning message.
* lisp/emacs-lisp/cl-extra.el (cl--print-table): Remove redundant arg.
2023-10-31 19:20:58 -04:00
Mattias Engdegård
0d452d61d0
; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use.
2023-10-30 11:48:04 +01:00
Stefan Monnier
bdec2d2d46
comp-cstr.el: The type hierarchy is a DAG, not a tree
...
Adjust the type operations to account for the fact that types can have
several parents.
* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy):
Use `cl--class-allparents`. Add FIXME.
(comp--direct-supertype): Declare obsolete.
(comp--direct-supertypes): New function.
(comp--normalize-typeset0): Rewrite to use `comp--direct-supertypes`;
adjust to account for the DAG structure; use `cl-set-difference`.
(comp--direct-subtypes): Rewrite.
(comp--intersection): New function.
(comp-supertypes): Rewrite and change return type.
(comp-subtype-p): Simplify.
(comp-union-typesets): Use `comp-supertypes` instead of iterating over
`comp-cstr-ctxt-typeof-types`.
* lisp/emacs-lisp/comp.el (comp--native-compile): Don't catch
errors if we're debugging.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Adjust tests.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix mishap when we
evaluate (cl-defstruct cl-structure-object ..) during the compilation
of `cl-preloaded.el`.
* lisp/emacs-lisp/cl-preloaded.el: Add corresponding assertion.
2023-10-30 00:59:19 -04:00
Eli Zaretskii
a8b14b77ff
; * lisp/emacs-lisp/comp-cstr.el: Fix punctuation.
2023-10-20 15:46:20 +03:00
Andrea Corallo
3e193edd68
Improve cstr typeset normalization
...
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add four tests.
* lisp/emacs-lisp/comp-cstr.el (comp--sym-lessp)
(comp--direct-supertype, comp--normalize-typeset0): New functions.
(comp-normalize-typeset): Rework to make use of
'comp--normalize-typeset0'.
(comp--direct-subtypes): New function.
2023-10-19 13:58:46 +02:00
Eli Zaretskii
acfd261a61
Merge from origin/emacs-29
...
0d8b69e0ad
Don't ding when completion succeeded
f11e2d3699
; * admin/git-bisect-start: Update failing commits
9855a3ea74
; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a com...
f4ee696b88
Improve documentation of color-related functions
90eadc3e23
Revert "* package.el (package--get-activatable-pkg): Pref...
65f355ea0a
; Update my mail address
a3a69ec234
Fix connection-local user options handling (bug#63300)
240803cc3e
Document 'startup-redirect-eln-cache'
026afb2298
; * etc/PROBLEMS: Entry about crashes due to anti-virus (...
bcc222251e
Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#5...
07c8211ca3
Add 'infer' as a keyword to typescript-ts-mode (bug#63880)
dd2d8ff2f5
; * etc/NEWS: Mention the issue with PGTK on WSL (bug#633...
fa8135f891
Revert changes to the order in which package descs are lo...
27fcfa2c0a
; * etc/NEWS: Improve instructions for grammar libraries.
2a84ab905c
Handle point in last file-name component in minibuffer co...
05f25238b7
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
4bc043ff45
Avoid asking redundant question in emacsbug.el
2eadf328d0
* test/infra/Dockerfile.emba (emacs-base): Don't install ...
583ba1db7e
typescript-ts-mode: Add a rule for function_signature
# Conflicts:
# etc/NEWS
# lisp/minibuffer.el
2023-06-10 06:42:43 -04:00
Andrea Corallo
65f355ea0a
; Update my mail address
...
* lisp/emacs-lisp/comp-cstr.el: Update author mail.
* lisp/emacs-lisp/comp.el: Likewise.
* src/comp.c: Likewise.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise.
* test/src/comp-resources/comp-test-funcs-dyn.el: Likewise.
* test/src/comp-resources/comp-test-funcs.el: Likewise.
* test/src/comp-resources/comp-test-pure.el: Likewise.
* test/src/comp-tests.el: Likewise.
2023-06-08 11:04:10 +02:00
Andrea Corallo
5d3d84066f
* lisp/emacs-lisp/comp-cstr.el (cl-macs): Require it.
2023-06-04 16:43:13 +02:00
Andrea Corallo
9ed24bfb04
* Have `comp-cstr-to-type-spec' handle comp-cstr-f as well
...
* lisp/emacs-lisp/comp-cstr.el (comp--simple-cstr-to-type-spec): New
function.
(comp-cstr-to-type-spec): Make use of.
2023-06-04 12:53:38 +02:00
Andrea Corallo
56a8d57d03
comp: Recompute type slots after byte compilation for user types
...
* lisp/emacs-lisp/comp-cstr.el (comp--compute-typeof-types)
(comp--compute--pred-type-h): New functions.
(comp-cstr-ctxt): Make use of.
(comp-cstr-ctxt-update-type-slots): New function.
* lisp/emacs-lisp/comp.el (comp-spill-lap): Use
`comp-cstr-ctxt-update-type-slots'.
2023-05-29 18:04:30 +02:00
Andrea Corallo
6c781b5d25
comp: Propagate pre slot access type check
...
* lisp/loadup.el (max-lisp-eval-depth): Increase
`max-lisp-eval-depth' to 3400.
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs): Pattern match pre
slot access type check and add constraint.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-cl-tag-p)
(comp-cstr-cl-tag): New functions.
* lisp/emacs-lisp/comp.el (make-comp-mvar): Add neg parameter.
2023-05-23 16:39:06 +02:00
Andrea Corallo
d03dd07774
comp: Make use of predicates in propagation for non builtin types
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-ctxt): Add `pred-type-h'
slot.
* lisp/emacs-lisp/comp.el (comp-known-predicate-p)
(comp-pred-to-cstr): Update.
2023-05-23 16:39:06 +02:00
Andrea Corallo
92ccb6ba83
comp: Account non builtin types in type hierarchy
...
* lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents): Add comment.
* lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class): Likewise.
* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy)
(comp--all-classes): New functions.
(comp-cstr-ctxt): Add `typeof-types' field.
* lisp/emacs-lisp/comp-cstr.el (comp-supertypes)
(comp-union-typesets): Update to use non builtin types.
2023-05-23 16:39:05 +02:00
Stefan Kangas
4f9862e435
; Fix typo
2023-02-18 13:39:28 +01:00
Eli Zaretskii
cae528457c
; Add 2023 to copyright years.
2023-01-01 05:31:12 -05:00
Stefan Kangas
db2ed9f333
; Fix several symbol name typos
2022-10-26 23:04:23 +02:00
Andrea Corallo
0bd96806ef
* Rename `comp--typeof-builtin-types'
...
* lisp/emacs-lisp/comp-cstr.el (comp--typeof-builtin-types): Rename.
(comp-normalize-valset, comp-common-supertype-2): Update.
2022-08-18 23:41:39 +02:00
Andrea Corallo
715f1ebea3
* lisp/emacs-lisp/comp-cstr.el (comp--all-builtin-types): Remove
2022-08-18 23:36:19 +02:00
Andrea Corallo
2ba42e596a
; Fix two mail addresses
...
;* lisp/emacs-lisp/comp.el: Fix author's mail address.
;* lisp/emacs-lisp/comp-cstr.el: Likewise.
2022-05-16 09:54:15 +02:00
Stefan Kangas
35bf8d4a02
Merge from origin/emacs-28
...
69e82968d7
Fix integer arithmetic miss-compilation (bug#53451)
31af9bca99
Mark flymake as compatible with emacs-26.1
2022-02-10 06:56:22 +01:00
Andrea Corallo
69e82968d7
Fix integer arithmetic miss-compilation (bug#53451)
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm):
When one of the two sources is negated revert to set dst as
number.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to
verify this is effective.
2022-02-09 17:58:57 +01:00
Eli Zaretskii
dcd76bd48d
Merge from origin/emacs-28
...
836be7a112
; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a
* lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65
; Minor fixes related to copyright years
23c1ee6989
; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89
* src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5
; Add 2022 to copyright years.
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
# lib/cdefs.h
# lisp/erc/erc-dcc.el
# lisp/erc/erc-imenu.el
# lisp/erc/erc-replace.el
# lisp/image-dired.el
# lisp/progmodes/xref.el
# m4/alloca.m4
# m4/byteswap.m4
# m4/errno_h.m4
# m4/getopt.m4
# m4/gnulib-common.m4
# m4/inttypes.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5
; Add 2022 to copyright years.
2022-01-01 02:45:51 -05:00
Andrea Corallo
fd86829e66
Make use of `comp-cstr-shallow-copy'
...
* lisp/emacs-lisp/comp.el (comp-mvar-propagate): Remove.
(comp-fwprop-call, comp-fwprop-insn): Use `comp-cstr-shallow-copy'.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range)
(comp-cstr-union-1-no-mem, comp-cstr-union-1)
(comp-cstr-intersection-no-mem, comp-cstr-intersection)
(comp-cstr-negation): Use `comp-cstr-shallow-copy'.
2021-12-01 22:21:04 +01:00
Andrea Corallo
f3284d5acd
* Redefine `comp-cstr-shallow-copy'
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Don't synthesize copier
function.
(comp-cstr-shallow-copy): New function.
(comp-cstr-=): Use `copy-sequence'.
2021-12-01 22:21:04 +01:00
Lars Ingebrigtsen
85e9e5f616
Don't quote nil and t in doc strings and comments
...
* test/src/minibuf-tests.el (test-try-completion-ignore-case):
* test/lisp/url/url-auth-tests.el
(url-auth-test-digest-auth-retrieve-cache):
* test/lisp/subr-tests.el (subr-tests-add-hook-depth):
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-invisible-buffer-function):
* test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort):
* src/xfaces.c:
* src/process.c (Finterrupt_process):
(syms_of_process):
* src/minibuf.c (Fread_from_minibuffer):
(Fcompleting_read):
(syms_of_minibuf):
* src/dispnew.c (syms_of_display):
* src/data.c:
* lisp/so-long.el (so-long--hack-local-variables):
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
(elisp--xref-find-definitions):
* lisp/org/ox-html.el (org-html-htmlize-output-type):
* lisp/org/org-agenda.el (org-agenda-do-in-region):
* lisp/net/tramp.el:
* lisp/minibuffer.el (set-minibuffer-message):
* lisp/isearch.el (isearch-wrap-pause):
(isearch-repeat-on-direction-change):
* lisp/emacs-lisp/timer.el (timer):
* lisp/emacs-lisp/package.el (package-read-archive-contents):
* lisp/emacs-lisp/faceup.el (faceup-next-property-change):
* lisp/emacs-lisp/comp.el (comp-func):
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p):
* lisp/emacs-lisp/cl-macs.el (cl-do):
(cl-do*):
(cl--self-tco):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions):
(byte-compile-cond-jump-table): Don't quote t and nil.
2021-09-21 22:11:43 +02:00
Stefan Kangas
0cabf8bc36
; Fix typos
2021-09-03 13:05:32 +02:00
Andrea Corallo
39ebc2689b
* Improve `comp-normalize-valset' reproducibility (bug#48021)
...
* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Make
it more reproducible.
2021-04-29 21:07:07 +02:00
Andrea Corallo
4e1e0b9dec
Have `comp-cstr-intersection-no-mem' intersect pos neg value sets
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-intersection-no-mem):
intersect pos and neg value sets
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add two tests and fix some
test number.
2021-04-27 22:58:41 +02:00
Andrea Corallo
40c71e574a
* lisp/emacs-lisp/comp-cstr.el (comp-ctxt): Initialize it.
2021-04-26 23:13:41 +02:00
Andrea Corallo
edf42af2cc
Rework where `comp-ctxt' is defined.
...
* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-ctxt): Remove
`comp-ctxt' definition.
* lisp/emacs-lisp/comp.el (comp-ctxt): Likewise.
* lisp/emacs-lisp/comp-cstr.el (comp-ctxt): Define it here.
2021-04-26 23:01:39 +02:00
Glenn Morris
b7c22fab7d
; Add 2021 to copyright years
2021-04-25 17:24:48 -07:00
Andrea Corallo
70adc28e97
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): (not null) => t.
2021-04-13 12:05:33 +02:00
Andrea Corallo
3062480309
* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Remove duplicates.
2021-04-13 12:05:33 +02:00
Andrea Corallo
08682ccc31
; Remove two unnecessary quotes
...
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Remove unnecessary
quote.
* lisp/emacs-lisp/comp.el (comp-compile-ctxt-to-file): Likewise.
2021-03-21 09:28:25 +01:00
Andrea Corallo
9809f7ed2c
Use `length=' and family where possible in native comp code
...
* lisp/emacs-lisp/comp-cstr.el (comp-intersect-typesets)
(comp-cstr-imm): Use Use `length=' and family where possible.
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-target-block)
(comp-compute-dominator-frontiers)
(batch-byte-native-compile-for-bootstrap): Likewise.
2021-03-07 21:33:53 +01:00
Andrea Corallo
c60f2f458a
Fix `comp-cstr-intersection-no-hashcons' for negated result cstr
...
* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-intersection-no-hashcons): When negated and
necessary relax dst to t.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
2021-03-06 23:17:14 +01:00
Andrea Corallo
05259c4a23
Fix `=' propagation to handle -0.0 0.0 case
...
* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-intersection-homogeneous): Fix indent + use `memql'.
(comp-cstr-=): Handle 0.0 -0.0 idiosyncrasy
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
tests and fix enumeration.
2021-03-06 20:38:00 +01:00