From 9dedfe95e5b4fe3abe39e42fe289947c00e6d9c3 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Mon, 20 May 2019 21:54:05 +0200 Subject: [PATCH] complex-float: add inline definitions for si::complex-*-float-p --- src/cmp/sysfun.lsp | 7 +++++++ src/h/object.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/cmp/sysfun.lsp b/src/cmp/sysfun.lsp index 47b5bf4bd..ea72cee2d 100644 --- a/src/cmp/sysfun.lsp +++ b/src/cmp/sysfun.lsp @@ -780,6 +780,13 @@ #+long-float (def-inline si:long-float-p :always (t) :bool "@0;ECL_LONG_FLOAT_P(#0)") +#+complex-float +(def-inline si::complex-single-float-p :always (t) :bool "@0;ECL_COMPLEX_SINGLE_FLOAT_P(#0)") +#+complex-float +(def-inline si::complex-double-float-p :always (t) :bool "@0;ECL_COMPLEX_DOUBLE_FLOAT_P(#0)") +#+complex-float +(def-inline si::complex-long-float-p :always (t) :bool "@0;ECL_COMPLEX_LONG_FLOAT_P(#0)") + (def-inline ext:fixnump :always (t) :bool "ECL_FIXNUMP(#0)") (def-inline ext:fixnump :always (fixnum) :bool "1") diff --git a/src/h/object.h b/src/h/object.h index 119275910..2175b4329 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -178,6 +178,9 @@ typedef cl_object (*cl_objectfn_fixed)(); #define ECL_BIGNUMP(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t == t_bignum)) #ifdef ECL_COMPLEX_FLOAT #define ECL_COMPLEXP(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t >= t_complex) && ((x)->d.t <= t_clfloat)) +#define ECL_COMPLEX_SINGLE_FLOAT_P(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t == t_csfloat)) +#define ECL_COMPLEX_DOUBLE_FLOAT_P(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t == t_cdfloat)) +#define ECL_COMPLEX_LONG_FLOAT_P(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t == t_clfloat)) #else #define ECL_COMPLEXP(x) ((ECL_IMMEDIATE(x) == 0) && ((x)->d.t == t_complex)) #endif