mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-27 19:50:44 -07:00
Add a special variable to control printing of SSE packs.
Valid values: NIL, :int, :float, :double. Non-NIL values override the type tag carried by the pack.
This commit is contained in:
parent
03049ee7e2
commit
1c3d729ef5
3 changed files with 10 additions and 0 deletions
|
|
@ -1073,6 +1073,14 @@ static void
|
|||
write_sse_pack(cl_object x, cl_object stream)
|
||||
{
|
||||
int i;
|
||||
cl_elttype etype = x->sse.elttype;
|
||||
cl_object mode = ecl_symbol_value(@'ext::*sse-pack-print-mode*');
|
||||
|
||||
if (mode != Cnil) {
|
||||
if (mode == @':float') etype = aet_sf;
|
||||
else if (mode == @':double') etype = aet_df;
|
||||
else etype = aet_b8;
|
||||
}
|
||||
|
||||
switch (x->sse.elttype) {
|
||||
case aet_sf:
|
||||
|
|
|
|||
|
|
@ -1940,6 +1940,7 @@ cl_symbols[] = {
|
|||
{EXT_ "FLOAT-SSE-PACK", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
{EXT_ "DOUBLE-SSE-PACK", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
{EXT_ "SSE-PACK-ELEMENT-TYPE", EXT_ORDINARY, si_sse_pack_element_type, 1, OBJNULL},
|
||||
{EXT_ "*SSE-PACK-PRINT-MODE*", EXT_SPECIAL, NULL, -1, Cnil},
|
||||
#endif
|
||||
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
|
|
|
|||
|
|
@ -1940,6 +1940,7 @@ cl_symbols[] = {
|
|||
{EXT_ "FLOAT-SSE-PACK",NULL},
|
||||
{EXT_ "DOUBLE-SSE-PACK",NULL},
|
||||
{EXT_ "SSE-PACK-ELEMENT-TYPE","si_sse_pack_element_type"},
|
||||
{EXT_ "*SSE-PACK-PRINT-MODE*",NULL},
|
||||
#endif
|
||||
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED",NULL},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue