fixnum != fixnum [was ping numbers.pika.hackerlab]
Matthew Dempsky <[email protected]> Sat, 13 Dec 2003 14:54:17 +0100
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
The latest patch in my tree "basic fixnum support" is bad and evil - don't merge it yet... here's why: Tom Lord <lord-1tv/[email protected]> writes: > -------------------------------- > | | > | scm/libscm-numbers-reps | scm_reps_add normally adds two > | | numbers but can also instead > | implements math routines | return scm_err_numeric_raise_needed > | and conversion <-> C types | > | | in that case, scm_add converts > | can add new numeric reps | the arguments to the same > | using the vtable facility | representation and retries > | | the add > -------------------------------- > | | > | scm/reps | > | | fixnum and double representations > | provides optimized | are coded here so that they > | representations for | can be heavily optimized > | fixnums and doubles | > | | other new number types just > | (also provides GC, | use the `vtable' facility > | vtable objects, etc.) | > -------------------------------- Something that eluded me until just now is that earlier when we discussed numbers implementations on IRC, we referred to small integers embedded in t_scm_words as fixnums and integers that needed to be heap allocated as bignums - I must have missed the phase when we started referring to both as fixnums. So, just to clarify things, the libscm-numbers-reps fixnum code is responsible for dispatch to reps fixnum when it can fit the result into a t_scm_word, but otherwise must create the bignum data. -jivera