mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Issue #305
This commit is contained in:
parent
6f10ee73ef
commit
acb50614ee
3 changed files with 7 additions and 2 deletions
|
@ -7,6 +7,10 @@ Features
|
|||
- Faster record type constructors
|
||||
- During compilation, validate the number of arguments passed to local function calls.
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Fixed `integer?` such that if `x` is an inexact real number, then `(integer? x)` is true if and only if `(= x (round x))`, per R7RS.
|
||||
|
||||
Internals
|
||||
- When including an internal `.scm` file used by the compiler, check the current directory before the system directory.
|
||||
|
||||
|
|
|
@ -1743,7 +1743,7 @@ object Cyc_is_integer(object o)
|
|||
if ((o != NULL) && (obj_is_int(o) ||
|
||||
(!is_value_type(o) && type_of(o) == integer_tag) ||
|
||||
(!is_value_type(o) && type_of(o) == bignum_tag)
|
||||
// || (!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o)))
|
||||
|| (!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o)))
|
||||
)) // Per R7RS
|
||||
return boolean_t;
|
||||
return boolean_f;
|
||||
|
|
|
@ -660,7 +660,8 @@
|
|||
(list ; Allocate on the C stack
|
||||
(string-append
|
||||
c-make-macro "(" cvar-name ", " rnum ", " inum ");")))))
|
||||
((integer? exp)
|
||||
((and (integer? exp)
|
||||
(exact? exp))
|
||||
(c-code (string-append "obj_int2obj("
|
||||
(number->string exp) ")")))
|
||||
((real? exp)
|
||||
|
|
Loading…
Add table
Reference in a new issue