Re: "cannot coerce inexact literal to fixnum"

2024-02-24 Thread Al
On 2024-02-10 16:39, Peter Bex wrote: Again, these could still be bignums when run on a 32-bit platform (that's why the return type of s32vector-ref is defined as "integer" and not "fixnum") Hm.. does this mean that using s32vector-ref and -set! always incur typecheck costs, no matter how I

Re: "cannot coerce inexact literal to fixnum"

2024-02-10 Thread Peter Bex
On Sat, Feb 10, 2024 at 04:07:12PM +0200, Al wrote: > On 2024-02-10 15:38, Peter Bex wrote: > > > That's because you're using fixnum mode. As I explained, using literals > > that might be too large for fixnums break the fixnum mode's premise that > > everything must be a fixnum. > > Oh. So it

Re: "cannot coerce inexact literal to fixnum"

2024-02-10 Thread Al
On 2024-02-10 15:38, Peter Bex wrote: That's because you're using fixnum mode. As I explained, using literals that might be too large for fixnums break the fixnum mode's premise that everything must be a fixnum. Oh. So it refuses to emit C code that might break on 32-bit at runtime (silent

Re: "cannot coerce inexact literal to fixnum"

2024-02-10 Thread Peter Bex
On Sat, Feb 10, 2024 at 02:32:16PM +0200, Al wrote: > That would be fine but where does that happen? csc actually barfs on my > Scheme code (as per the subject line), instead of emitting C code to > encode/decode into a string at runtime, as you mention. That's because you're using fixnum mode.

Re: "cannot coerce inexact literal to fixnum"

2024-02-10 Thread Al
On 2024-02-10 13:00, Peter Bex wrote: These so-called "big-fixnums" are compiled into a string literal which gets decoded on-the-fly at runtime into either a fixnum (on 64-bit) or a bignum (on 32-bit). That would be fine but where does that happen? csc actually barfs on my Scheme code (as

Re: "cannot coerce inexact literal to fixnum"

2024-02-10 Thread Peter Bex
On Sat, Feb 10, 2024 at 08:12:38AM +0200, Al wrote: > On 2024-02-10 02:42, Al wrote: > > > ... if I enable fixnum, csc chokes on both the third and fourth > > display's with: "Error: cannot coerce inexact literal `2147483647' to > > fixnum". It compiles and runs

Re: "cannot coerce inexact literal to fixnum"

2024-02-09 Thread Al
On 2024-02-10 02:42, Al wrote: ... if I enable fixnum, csc chokes on both the third and fourth display's with: "Error: cannot coerce inexact literal `2147483647' to fixnum". It compiles and runsĀ fine if those lines are commented out (or if fixnum is disabled). So the error

"cannot coerce inexact literal to fixnum"

2024-02-09 Thread Al
s much greater than INT32_MAX. However, if I enable fixnum, csc chokes on both the third and fourth display's with: "Error: cannot coerce inexact literal `2147483647' to fixnum". It compiles and runsĀ fine if those lines are commented out (or if fixnum is disabled). Not sure what's wron