[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: [Help-smalltalk] Porting of 2.0.3 to freebsd
From: |
clemens fischer |
Subject: |
Re: Fw: [Help-smalltalk] Porting of 2.0.3 to freebsd |
Date: |
26 Jul 2002 13:58:55 +0200 |
> Bonzini:
> > > wow! please tell us ASAP, because i'm in the same situation. would
> > > you please send me the diff?
> >
> > you can send it to the list. It'll please people since I cannot
> > publish new
> > versions until mid September, most likely.
while using the the proposal from Fritz Heinrichmeyer, the following
happened:
In file included from interp.c:662:
prims.inl: In function `VMpr_FloatQ_fractionPart':
prims.inl:2072: warning: passing arg 2 of `modf' from incompatible pointer type
prims.inl:2078: warning: passing arg 2 of `modf' from incompatible pointer type
and the source code (libgst/prims.inl) looks like this (example for
powl(3)):
/* FloatD fractionPart */
static long
VMpr_FloatD_fractionPart(int id,
volatile int numArgs,
OOP methodOOP)
{
OOP oop1;
_gst_primitives_executed++;
oop1 = POP_OOP ();
if (RECEIVER_IS_CLASS (oop1, _gst_floatd_class))
{
double farg1;
double fdummy;
farg1 = FLOATD_OOP_VALUE (oop1);
if (farg1 < 0.0)
{
farg1 = -modf (-farg1, &fdummy);
if (farg1 < -0.999999999999995)
farg1 = 0.0;
}
else
{
farg1 = modf (farg1, &fdummy);
if (farg1 > 0.999999999999995)
farg1 = 0.0;
}
-------------------- 8< -----------------------
VMpr_FloatE_fractionPart(int id,
volatile int numArgs,
OOP methodOOP)
{
OOP oop1;
_gst_primitives_executed++;
oop1 = POP_OOP ();
if (RECEIVER_IS_CLASS (oop1, _gst_floate_class))
{
double farg1;
double fdummy;
farg1 = FLOATE_OOP_VALUE (oop1);
if (farg1 < 0.0)
{
farg1 = -modf (-farg1, &fdummy);
if (farg1 < -0.999999999999995)
farg1 = 0.0;
}
else
{
farg1 = modf (farg1, &fdummy);
if (farg1 > 0.999999999999995)
farg1 = 0.0;
}
-------------------- 8< -----------------------
VMpr_FloatQ_fractionPart(int id,
volatile int numArgs,
OOP methodOOP)
{
OOP oop1;
_gst_primitives_executed++;
oop1 = POP_OOP ();
if (RECEIVER_IS_CLASS (oop1, _gst_floatq_class))
{
long double farg1;
long double fdummy;
farg1 = FLOATQ_OOP_VALUE (oop1);
if (farg1 < 0.0)
{
farg1 = -modf (-farg1, &fdummy);
if (farg1 < -0.999999999999999995)
farg1 = 0.0;
}
else
{
farg1 = modf (farg1, &fdummy);
if (farg1 > 0.999999999999999995)
farg1 = 0.0;
}
-------------------- 8< -----------------------
so there's a lot of conversion for the different types involved. is this
bound to lead to a catastrophy? would it be better to sell the piano forte
and build a bomb-shelter?
i can run the Blox class browser, but it segfaults when i click on "garbage
collect" ...
clemens