]> git.eshelyaron.com Git - emacs.git/commit
Fix `eql' `equal' propagation of non hash consed values (bug#46843)
authorAndrea Corallo <akrl@sdf.org>
Mon, 1 Mar 2021 18:39:00 +0000 (19:39 +0100)
committerAndrea Corallo <akrl@sdf.org>
Mon, 1 Mar 2021 17:09:40 +0000 (18:09 +0100)
commit3d014e1bf48f661f0b229ddf735608ff0ba7cfe6
tree43546114820b1146cd0bc37c015ccd8a9a1dfed5
parent5bc08559e8f171eafc3c034232f8cfd9eaf89862
Fix `eql' `equal' propagation of non hash consed values (bug#46843)

Extend assumes allowing the following form:

(assume dst (and-nhc src1 src2))

`and-nhc' assume operator allow for constraining correctly
intersections where non hash consed values are not propagated as
values but rather promoted to their types.

* lisp/emacs-lisp/comp-cstr.el
(comp-cstr-intersection-no-hashcons): New function.
* lisp/emacs-lisp/comp.el (comp-emit-assume): Logic update to emit
`and-nhc' operator (implemented in fwprop by
`comp-cstr-intersection-no-hashcons').
(comp-add-cond-cstrs): Map `eq' to `and' assume operator and
`equal' `eql' into `and-nhc'.
(comp-fwprop-insn): Update to handle `and-nhc'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
tests covering `eql' and `equal' propagation of non hash consed
values.
lisp/emacs-lisp/comp-cstr.el
lisp/emacs-lisp/comp.el
test/src/comp-tests.el