@@ -1379,8 +1379,6 @@ static JSValue js_int64(int64_t v)
1379
1379
return js_float64(v);
1380
1380
}
1381
1381
1382
- #define JS_NewInt64(ctx, val) js_int64(val)
1383
-
1384
1382
static JSValue js_number(double d)
1385
1383
{
1386
1384
if (double_is_int32(d))
@@ -13817,7 +13815,7 @@ static no_inline __exception int js_unary_arith_slow(JSContext *ctx,
13817
13815
default:
13818
13816
abort();
13819
13817
}
13820
- sp[-1] = JS_NewInt64(ctx, v64);
13818
+ sp[-1] = js_int64( v64);
13821
13819
}
13822
13820
break;
13823
13821
case JS_TAG_SHORT_BIG_INT:
@@ -13953,7 +13951,7 @@ static no_inline int js_not_slow(JSContext *ctx, JSValue *sp)
13953
13951
int32_t v1;
13954
13952
if (unlikely(JS_ToInt32Free(ctx, &v1, op1)))
13955
13953
goto exception;
13956
- sp[-1] = JS_NewInt32(ctx, ~v1);
13954
+ sp[-1] = js_int32( ~v1);
13957
13955
}
13958
13956
return 0;
13959
13957
exception:
@@ -14226,7 +14224,7 @@ static no_inline __exception int js_add_slow(JSContext *ctx, JSValue *sp)
14226
14224
v1 = JS_VALUE_GET_INT(op1);
14227
14225
v2 = JS_VALUE_GET_INT(op2);
14228
14226
v = (int64_t)v1 + (int64_t)v2;
14229
- sp[-2] = JS_NewInt64(ctx, v);
14227
+ sp[-2] = js_int64( v);
14230
14228
} else if ((tag1 == JS_TAG_BIG_INT || tag1 == JS_TAG_SHORT_BIG_INT) &&
14231
14229
(tag2 == JS_TAG_BIG_INT || tag2 == JS_TAG_SHORT_BIG_INT)) {
14232
14230
JSBigInt *p1, *p2, *r;
@@ -15021,7 +15019,7 @@ static __exception int js_operator_private_in(JSContext *ctx, JSValue *sp)
15021
15019
}
15022
15020
JS_FreeValue(ctx, op1);
15023
15021
JS_FreeValue(ctx, op2);
15024
- sp[-2] = JS_NewBool(ctx, ret);
15022
+ sp[-2] = js_bool( ret);
15025
15023
return 0;
15026
15024
}
15027
15025
@@ -42628,7 +42626,7 @@ static JSValue js_number_constructor(JSContext *ctx, JSValueConst new_target,
42628
42626
return val;
42629
42627
switch(JS_VALUE_GET_TAG(val)) {
42630
42628
case JS_TAG_SHORT_BIG_INT:
42631
- val = JS_NewInt64(ctx, JS_VALUE_GET_SHORT_BIG_INT(val));
42629
+ val = js_int64( JS_VALUE_GET_SHORT_BIG_INT(val));
42632
42630
if (JS_IsException(val))
42633
42631
return val;
42634
42632
break;
@@ -42638,7 +42636,7 @@ static JSValue js_number_constructor(JSContext *ctx, JSValueConst new_target,
42638
42636
double d;
42639
42637
d = js_bigint_to_float64(ctx, p);
42640
42638
JS_FreeValue(ctx, val);
42641
- val = JS_NewFloat64(ctx, d);
42639
+ val = js_float64( d);
42642
42640
}
42643
42641
break;
42644
42642
default:
@@ -52859,7 +52857,7 @@ static JSValue js_Date_parse(JSContext *ctx, JSValueConst this_val,
52859
52857
for(i = 0; i < 7; i++)
52860
52858
fields1[i] = fields[i];
52861
52859
d = set_date_fields(fields1, is_local) - fields[8] * 60000;
52862
- rv = JS_NewFloat64(ctx, d);
52860
+ rv = js_float64( d);
52863
52861
}
52864
52862
}
52865
52863
JS_FreeValue(ctx, s);
@@ -57727,7 +57725,7 @@ static JSValue js_callsite_isnative(JSContext *ctx, JSValueConst this_val, int a
57727
57725
JSCallSiteData *csd = JS_GetOpaque2(ctx, this_val, JS_CLASS_CALL_SITE);
57728
57726
if (!csd)
57729
57727
return JS_EXCEPTION;
57730
- return JS_NewBool(ctx, csd->native);
57728
+ return js_bool( csd->native);
57731
57729
}
57732
57730
57733
57731
static JSValue js_callsite_getnumber(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic)
@@ -57736,7 +57734,7 @@ static JSValue js_callsite_getnumber(JSContext *ctx, JSValueConst this_val, int
57736
57734
if (!csd)
57737
57735
return JS_EXCEPTION;
57738
57736
int *field = (void *)((char *)csd + magic);
57739
- return JS_NewInt32(ctx, *field);
57737
+ return js_int32( *field);
57740
57738
}
57741
57739
57742
57740
static const JSCFunctionListEntry js_callsite_proto_funcs[] = {
0 commit comments