This commit is contained in:
2026-02-15 14:58:46 -06:00
parent ebd624b772
commit 96bbb9e4c8
20 changed files with 25577 additions and 25530 deletions

View File

@@ -8837,8 +8837,7 @@ static JSValue js_cell_array_sort (JSContext *ctx, JSValue this_val, int argc, J
arr = JS_VALUE_GET_ARRAY (arr_ref.val);
items[i] = arr->values[i];
}
} else if (JS_VALUE_GET_TAG (argv[1]) == JS_TAG_STRING
|| JS_VALUE_GET_TAG (argv[1]) == JS_TAG_STRING_IMM) {
} else if (JS_VALUE_IS_TEXT (argv[1])) {
JSValue prop_key = js_key_from_string (ctx, argv[1]);
/* Re-read items[i] (js_key_from_string no longer allocates, but re-read is harmless) */
arr = JS_VALUE_GET_ARRAY (arr_ref.val);
@@ -8870,7 +8869,7 @@ static JSValue js_cell_array_sort (JSContext *ctx, JSValue this_val, int argc, J
if (key_tag == JS_TAG_INT || key_tag == JS_TAG_FLOAT64 || key_tag == JS_TAG_SHORT_FLOAT) {
JS_ToFloat64 (ctx, &keys[i], key);
if (i == 0) is_string = 0;
} else if (key_tag == JS_TAG_STRING || key_tag == JS_TAG_STRING_IMM) {
} else if (JS_VALUE_IS_TEXT (key)) {
if (i == 0) {
is_string = 1;
str_keys = alloca (sizeof (char *) * len);