remove bigint

This commit is contained in:
2025-06-17 15:02:40 -05:00
parent c9adbed3ff
commit 41fdf49df5
3 changed files with 14 additions and 2645 deletions

View File

@@ -231,7 +231,6 @@ DEF( strict_neq, 1, 2, 1, none)
DEF( and, 1, 2, 1, none)
DEF( xor, 1, 2, 1, none)
DEF( or, 1, 2, 1, none)
DEF(push_bigint_i32, 5, 0, 1, i32)
/* must be the last non short and non temporary opcode */
DEF( nop, 1, 0, 0, none)

File diff suppressed because it is too large Load Diff

View File

@@ -136,11 +136,6 @@ static inline JS_BOOL JS_VALUE_IS_NAN(JSValue v)
return 0;
}
static inline JSValue __JS_NewShortBigInt(JSContext *ctx, int32_t d)
{
return JS_MKVAL(JS_TAG_SHORT_BIG_INT, d);
}
#elif defined(JS_NAN_BOXING)
typedef uint64_t JSValue;
@@ -207,11 +202,6 @@ static inline JS_BOOL JS_VALUE_IS_NAN(JSValue v)
return tag == (JS_NAN >> 32);
}
static inline JSValue __JS_NewShortBigInt(JSContext *ctx, int32_t d)
{
return JS_MKVAL(JS_TAG_SHORT_BIG_INT, d);
}
#else /* !JS_NAN_BOXING */
typedef union JSValueUnion {
@@ -268,14 +258,6 @@ static inline JS_BOOL JS_VALUE_IS_NAN(JSValue v)
return (u.u64 & 0x7fffffffffffffff) > 0x7ff0000000000000;
}
static inline JSValue __JS_NewShortBigInt(JSContext *ctx, int64_t d)
{
JSValue v;
v.tag = JS_TAG_SHORT_BIG_INT;
v.u.short_big_int = d;
return v;
}
#endif /* !JS_NAN_BOXING */
#define JS_VALUE_IS_BOTH_INT(v1, v2) ((JS_VALUE_GET_TAG(v1) | JS_VALUE_GET_TAG(v2)) == 0)
@@ -579,9 +561,6 @@ static js_force_inline JSValue JS_NewUint32(JSContext *ctx, uint32_t val)
return v;
}
JSValue JS_NewBigInt64(JSContext *ctx, int64_t v);
JSValue JS_NewBigUint64(JSContext *ctx, uint64_t v);
static js_force_inline JSValue JS_NewFloat64(JSContext *ctx, double d)
{
int32_t val;
@@ -607,12 +586,6 @@ static inline JS_BOOL JS_IsNumber(JSValueConst v)
return tag == JS_TAG_INT || JS_TAG_IS_FLOAT64(tag);
}
static inline JS_BOOL JS_IsBigInt(JSContext *ctx, JSValueConst v)
{
int tag = JS_VALUE_GET_TAG(v);
return tag == JS_TAG_BIG_INT || tag == JS_TAG_SHORT_BIG_INT;
}
static inline JS_BOOL JS_IsBool(JSValueConst v)
{
return JS_VALUE_GET_TAG(v) == JS_TAG_BOOL;
@@ -716,9 +689,6 @@ int JS_ToInt64(JSContext *ctx, int64_t *pres, JSValueConst val);
int JS_ToIndex(JSContext *ctx, uint64_t *plen, JSValueConst val);
int JS_ToFloat64(JSContext *ctx, double *pres, JSValueConst val);
/* return an exception if 'val' is a Number */
int JS_ToBigInt64(JSContext *ctx, int64_t *pres, JSValueConst val);
/* same as JS_ToInt64() but allow BigInt */
int JS_ToInt64Ext(JSContext *ctx, int64_t *pres, JSValueConst val);
JSValue JS_NewStringLen(JSContext *ctx, const char *str1, size_t len1);
static inline JSValue JS_NewString(JSContext *ctx, const char *str)