[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pika-dev] fixnum != fixnum [was ping numbers.pika.hackerlab]
From: |
Matthew Dempsky |
Subject: |
[Pika-dev] fixnum != fixnum [was ping numbers.pika.hackerlab] |
Date: |
Sat, 13 Dec 2003 14:54:17 +0100 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
The latest patch in my tree "basic fixnum support" is bad and evil -
don't merge it yet... here's why:
Tom Lord <address@hidden> 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