gpgscm: Remove framework for immediate values.
authorJustus Winter <justus@g10code.com>
Thu, 16 Mar 2017 15:58:00 +0000 (16:58 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 17 Mar 2017 09:34:15 +0000 (10:34 +0100)
commit38c955599f7c6c20faeec57d8e1df7d2c0eeba18
tree43b73d45a00cbce1fc43e8c39f7d1e5a50061f4b
parent8c8ce8711d9c938fcb982b0341e6b052742cb887
gpgscm: Remove framework for immediate values.

* tests/gpgscm/scheme.c (IMMEDIATE_TAG): Remove macro.
(is_immediate): Likewise.
(set_immediate): Likewise.
(clr_immediate): Likewise.
(enum scheme_types): Set the LSB in every value.
(fill_vector): Adapt.
(vector_elem): Likewise.
(set_vector_elem): Likewise.
(mark): Likewise.
(gc): Test for the LSB to tell typeflags apart from pointers stored in
the same memory location.
--

Supporting immediate values would require invasive changes to the
interpreter and is likely not worth the trouble.  On the other hand,
tagging pointers in vectors complicated the hash table implementation
needlessly.  Therefore, I remove this again.

This fixes a crash on big endian architectures.

GnuPG-bug-id: 2996
Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/scheme.c