Skip to content

Commit

Permalink
Remove BigFloat (#31)
Browse files Browse the repository at this point in the history
Part of #17
  • Loading branch information
bnoordhuis authored Nov 8, 2023
1 parent c1ed688 commit e449cb0
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 1,952 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ prefix=/usr/local
#CONFIG_MSAN=y
# use UB sanitizer
#CONFIG_UBSAN=y
# include the code for BigInt/BigFloat
# include the code for BigInt
CONFIG_BIGNUM=y

OBJDIR=.obj
Expand Down
66 changes: 0 additions & 66 deletions examples/pi_bigfloat.js

This file was deleted.

1 change: 0 additions & 1 deletion qjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ static JSContext *JS_NewCustomContext(JSRuntime *rt)
return NULL;
#ifdef CONFIG_BIGNUM
if (bignum_ext) {
JS_AddIntrinsicBigFloat(ctx);
JS_AddIntrinsicOperators(ctx);
JS_EnableBignumExt(ctx, TRUE);
}
Expand Down
2 changes: 0 additions & 2 deletions qjsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ int main(int argc, char **argv)
ctx = JS_NewContext(rt);
#ifdef CONFIG_BIGNUM
if (bignum_ext) {
JS_AddIntrinsicBigFloat(ctx);
JS_AddIntrinsicOperators(ctx);
JS_EnableBignumExt(ctx, TRUE);
}
Expand Down Expand Up @@ -689,7 +688,6 @@ int main(int argc, char **argv)
#ifdef CONFIG_BIGNUM
if (bignum_ext) {
fprintf(fo,
" JS_AddIntrinsicBigFloat(ctx);\n"
" JS_AddIntrinsicOperators(ctx);\n"
" JS_EnableBignumExt(ctx, 1);\n");
}
Expand Down
7 changes: 0 additions & 7 deletions quickjs-atom.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ DEF(reason, "reason")
DEF(globalThis, "globalThis")
#ifdef CONFIG_BIGNUM
DEF(bigint, "bigint")
DEF(bigfloat, "bigfloat")
DEF(bigdecimal, "bigdecimal")
DEF(roundingMode, "roundingMode")
DEF(maximumSignificantDigits, "maximumSignificantDigits")
DEF(maximumFractionDigits, "maximumFractionDigits")
#endif
#ifdef CONFIG_ATOMICS
DEF(not_equal, "not-equal")
Expand Down Expand Up @@ -218,8 +213,6 @@ DEF(Float64Array, "Float64Array")
DEF(DataView, "DataView")
#ifdef CONFIG_BIGNUM
DEF(BigInt, "BigInt")
DEF(BigFloat, "BigFloat")
DEF(BigFloatEnv, "BigFloatEnv")
DEF(OperatorSet, "OperatorSet")
DEF(Operators, "Operators")
#endif
Expand Down
3 changes: 0 additions & 3 deletions quickjs-opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ DEF( and, 1, 2, 1, none)
DEF( xor, 1, 2, 1, none)
DEF( or, 1, 2, 1, none)
DEF(is_undefined_or_null, 1, 1, 1, none)
#ifdef CONFIG_BIGNUM
DEF( mul_pow10, 1, 2, 1, none)
#endif
/* must be the last non short and non temporary opcode */
DEF( nop, 1, 0, 0, none)

Expand Down
Loading

0 comments on commit e449cb0

Please sign in to comment.