mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
Speed up (complex?)
This commit is contained in:
parent
829f7d86b0
commit
60e9007d57
2 changed files with 8 additions and 7 deletions
|
@ -440,12 +440,13 @@ object Cyc_is_list(object lst);
|
||||||
#define Cyc_is_null(o) (make_boolean(o == NULL))
|
#define Cyc_is_null(o) (make_boolean(o == NULL))
|
||||||
//TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
|
//TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
|
||||||
object Cyc_is_number(object o);
|
object Cyc_is_number(object o);
|
||||||
object Cyc_is_complex(object o);
|
|
||||||
object Cyc_is_real(object o);
|
object Cyc_is_real(object o);
|
||||||
object Cyc_is_integer(object o);
|
object Cyc_is_integer(object o);
|
||||||
#define Cyc_is_fixnum(o) (make_boolean(obj_is_int(o)))
|
#define Cyc_is_fixnum(o) (make_boolean(obj_is_int(o)))
|
||||||
//object Cyc_is_fixnum(object o);
|
//object Cyc_is_fixnum(object o);
|
||||||
#define Cyc_is_bignum(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bignum_tag))
|
#define Cyc_is_bignum(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bignum_tag))
|
||||||
|
//object Cyc_is_complex(object o);
|
||||||
|
#define Cyc_is_complex(o) (make_boolean(is_object_type(o) && ((list) o)->tag == complex_num_tag))
|
||||||
//object Cyc_is_bignum(object o);
|
//object Cyc_is_bignum(object o);
|
||||||
//object Cyc_is_vector(object o);
|
//object Cyc_is_vector(object o);
|
||||||
//object Cyc_is_bytevector(object o);
|
//object Cyc_is_bytevector(object o);
|
||||||
|
|
12
runtime.c
12
runtime.c
|
@ -1745,12 +1745,12 @@ object Cyc_is_real(object o)
|
||||||
return boolean_f;
|
return boolean_f;
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_is_complex(object o)
|
//object Cyc_is_complex(object o)
|
||||||
{
|
//{
|
||||||
if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == complex_num_tag)
|
// if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == complex_num_tag)
|
||||||
return boolean_t;
|
// return boolean_t;
|
||||||
return boolean_f;
|
// return boolean_f;
|
||||||
}
|
//}
|
||||||
|
|
||||||
//object Cyc_is_fixnum(object o)
|
//object Cyc_is_fixnum(object o)
|
||||||
//{
|
//{
|
||||||
|
|
Loading…
Add table
Reference in a new issue