mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 06:54:26 +03:00
2020-01-19 release
This commit is contained in:
18
quickjs.h
18
quickjs.h
@@ -53,7 +53,7 @@ typedef struct JSClass JSClass;
|
||||
typedef uint32_t JSClassID;
|
||||
typedef uint32_t JSAtom;
|
||||
|
||||
#if defined(__x86_64__) || defined(__aarch64__)
|
||||
#if INTPTR_MAX >= INT64_MAX
|
||||
#define JS_PTR64
|
||||
#define JS_PTR64_DEF(a) a
|
||||
#else
|
||||
@@ -366,7 +366,9 @@ void JS_AddIntrinsicPromise(JSContext *ctx);
|
||||
void JS_AddIntrinsicBigInt(JSContext *ctx);
|
||||
void JS_AddIntrinsicBigFloat(JSContext *ctx);
|
||||
void JS_AddIntrinsicBigDecimal(JSContext *ctx);
|
||||
/* enable "use bigint", "use math" and operator overloading */
|
||||
/* enable operator overloading */
|
||||
void JS_AddIntrinsicOperators(JSContext *ctx);
|
||||
/* enable "use math" */
|
||||
void JS_EnableBignumExt(JSContext *ctx, JS_BOOL enable);
|
||||
|
||||
JSValue js_string_codePointRange(JSContext *ctx, JSValueConst this_val,
|
||||
@@ -531,12 +533,16 @@ static js_force_inline JSValue JS_NewFloat64(JSContext *ctx, double d)
|
||||
return v;
|
||||
}
|
||||
|
||||
JS_BOOL JS_IsNumber(JSValueConst v);
|
||||
|
||||
static inline JS_BOOL JS_IsInteger(JSValueConst v)
|
||||
static inline JS_BOOL JS_IsNumber(JSValueConst v)
|
||||
{
|
||||
int tag = JS_VALUE_GET_TAG(v);
|
||||
return tag == JS_TAG_INT || tag == JS_TAG_BIG_INT;
|
||||
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;
|
||||
}
|
||||
|
||||
static inline JS_BOOL JS_IsBigFloat(JSValueConst v)
|
||||
|
Reference in New Issue
Block a user