added some function prototypes

This commit is contained in:
hyunghwan.chung 2019-01-01 06:44:28 +00:00
parent 25e2c070cf
commit 1463621bdb
3 changed files with 91 additions and 10 deletions

View File

@ -370,18 +370,23 @@ class(#limited) SmallInteger(Integer)
method(#primitive) asError.
}
class(#liword,#limited) LargeInteger(Integer)
class(#limited,#immutable,#liword) LargeInteger(Integer)
{
}
class(#liword,#immutable) LargePositiveInteger(LargeInteger)
class(#limited,#immutable,#liword) LargePositiveInteger(LargeInteger)
{
method abs { ^self }
method sign { ^1 }
}
class(#liword,#immutable) LargeNegativeInteger(LargeInteger)
class(#limited,#immutable,#liword) LargeNegativeInteger(LargeInteger)
{
method abs { ^self negated }
method sign { ^-1 }
}
class(#limited,#immutable) FixedPointDecimal(Number)
{
var value, scale.
}

View File

@ -360,7 +360,7 @@ static kernel_class_info_t kernel_classes[] =
{ 20,
{ 'L','a','r','g','e','P','o','s','i','t','i','v','e','I','n','t','e','g','e','r' },
0,
MOO_CLASS_SELFSPEC_FLAG_LIMITED,
0,
0,
MOO_CLASS_SPEC_FLAG_INDEXED | MOO_CLASS_SPEC_FLAG_IMMUTABLE,
@ -369,7 +369,7 @@ static kernel_class_info_t kernel_classes[] =
{ 20,
{ 'L','a','r','g','e','N','e','g','a','t','i','v','e','I','n','t','e','g','e','r' },
0,
MOO_CLASS_SELFSPEC_FLAG_LIMITED,
0,
0,
MOO_CLASS_SPEC_FLAG_INDEXED | MOO_CLASS_SPEC_FLAG_IMMUTABLE,
@ -381,7 +381,7 @@ static kernel_class_info_t kernel_classes[] =
MOO_CLASS_SELFSPEC_FLAG_LIMITED,
0,
MOO_FPDEC_NAMED_INSTVARS,
MOO_CLASS_SPEC_FLAG_INDEXED,
MOO_CLASS_SPEC_FLAG_IMMUTABLE,
MOO_OBJ_TYPE_OOP,
MOO_OFFSETOF(moo_t, _fixed_point_decimal) },

View File

@ -1372,9 +1372,85 @@ moo_oop_t moo_makefpdec (
moo_oop_t moo_truncfpdecval (
moo_t* moo,
moo_oop_t iv,
moo_ooi_t cs,
moo_ooi_t ns
moo_oop_t iv, /* integer */
moo_ooi_t cs, /* current scale */
moo_ooi_t ns /* new scale */
);
moo_oop_t moo_addnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_subnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_mulnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_mltnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_divnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_gtnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_genums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_ltnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_lenums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_eqnums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_nenums (
moo_t* moo,
moo_oop_t x,
moo_oop_t y
);
moo_oop_t moo_sqrtnum (
moo_t* moo,
moo_oop_t x
);
moo_oop_t moo_absnum (
moo_t* moo,
moo_oop_t x
);
/* ========================================================================= */