@@ -1132,7 +1132,7 @@ typedef enum JSStrictEqModeEnum {
1132
1132
1133
1133
static BOOL js_strict_eq2(JSContext *ctx, JSValue op1, JSValue op2,
1134
1134
JSStrictEqModeEnum eq_mode);
1135
- static BOOL js_strict_eq(JSContext *ctx, JSValue op1, JSValue op2);
1135
+ static BOOL js_strict_eq(JSContext *ctx, JSValueConst op1, JSValueConst op2);
1136
1136
static BOOL js_same_value(JSContext *ctx, JSValueConst op1, JSValueConst op2);
1137
1137
static BOOL js_same_value_zero(JSContext *ctx, JSValueConst op1, JSValueConst op2);
1138
1138
static JSValue JS_ToObject(JSContext *ctx, JSValueConst val);
@@ -14239,7 +14239,7 @@ static no_inline __exception int js_eq_slow(JSContext *ctx, JSValue *sp,
14239
14239
goto exception;
14240
14240
}
14241
14241
}
14242
- res = js_strict_eq (ctx, op1, op2);
14242
+ res = js_strict_eq2 (ctx, op1, op2, JS_EQ_STRICT );
14243
14243
} else if (tag1 == JS_TAG_BOOL) {
14244
14244
op1 = JS_NewInt32(ctx, JS_VALUE_GET_INT(op1));
14245
14245
goto redo;
@@ -14557,9 +14557,16 @@ static BOOL js_strict_eq2(JSContext *ctx, JSValue op1, JSValue op2,
14557
14557
return res;
14558
14558
}
14559
14559
14560
- static BOOL js_strict_eq(JSContext *ctx, JSValue op1, JSValue op2)
14560
+ static BOOL js_strict_eq(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14561
+ {
14562
+ return js_strict_eq2(ctx,
14563
+ JS_DupValue(ctx, op1), JS_DupValue(ctx, op2),
14564
+ JS_EQ_STRICT);
14565
+ }
14566
+
14567
+ BOOL JS_StrictEq(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14561
14568
{
14562
- return js_strict_eq2 (ctx, op1, op2, JS_EQ_STRICT );
14569
+ return js_strict_eq (ctx, op1, op2);
14563
14570
}
14564
14571
14565
14572
static BOOL js_same_value(JSContext *ctx, JSValueConst op1, JSValueConst op2)
@@ -14569,18 +14576,28 @@ static BOOL js_same_value(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14569
14576
JS_EQ_SAME_VALUE);
14570
14577
}
14571
14578
14579
+ BOOL JS_SameValue(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14580
+ {
14581
+ return js_same_value(ctx, op1, op2);
14582
+ }
14583
+
14572
14584
static BOOL js_same_value_zero(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14573
14585
{
14574
14586
return js_strict_eq2(ctx,
14575
14587
JS_DupValue(ctx, op1), JS_DupValue(ctx, op2),
14576
14588
JS_EQ_SAME_VALUE_ZERO);
14577
14589
}
14578
14590
14591
+ BOOL JS_SameValueZero(JSContext *ctx, JSValueConst op1, JSValueConst op2)
14592
+ {
14593
+ return js_same_value_zero(ctx, op1, op2);
14594
+ }
14595
+
14579
14596
static no_inline int js_strict_eq_slow(JSContext *ctx, JSValue *sp,
14580
14597
BOOL is_neq)
14581
14598
{
14582
14599
BOOL res;
14583
- res = js_strict_eq (ctx, sp[-2], sp[-1]);
14600
+ res = js_strict_eq2 (ctx, sp[-2], sp[-1], JS_EQ_STRICT );
14584
14601
sp[-2] = JS_NewBool(ctx, res ^ is_neq);
14585
14602
return 0;
14586
14603
}
0 commit comments