Fix float32 again
JerryScript CI / Checks (push) Failing after 22s
JerryScript CI / Linux_x86_cpointer-32bit_Build_Correctness_Tests (push) Failing after 16s
JerryScript CI / Linux_x86-64_Build_Option_Tests (push) Failing after 14s
JerryScript CI / Conformance_Tests_ESNext_Debug_B (push) Failing after 10s
JerryScript CI / ASAN_Tests (push) Failing after 14s
JerryScript CI / ASAN_Tests_Debug (push) Failing after 15s
JerryScript CI / UBSAN_Tests (push) Failing after 14s
JerryScript CI / Linux_ARMv7l_Tests (push) Failing after 15s
JerryScript CI / Linux_ARMv7l_Tests_Debug (push) Failing after 14s
JerryScript CI / Linux_AArch64_Tests (push) Failing after 14s
JerryScript CI / Linux_x86-64_Build_Correctness_Debugger_Tests (push) Failing after 8s
JerryScript CI / Conformance_Tests_ESNext (push) Failing after 10s
JerryScript CI / Conformance_Tests_ESNext_Debug_A (push) Failing after 10s
JerryScript CI / Unit_Tests (push) Failing after 8s
JerryScript CI / Clang_Unit_Build_Option_Tests (push) Failing after 16s
JerryScript CI / Zephyr_STM32F4_Build_Test (push) Failing after 14s
JerryScript CI / Win_x86-64_Conformance_Tests_ESNext_Debug (push) Has been cancelled
JerryScript CI / Win_x86-64_Tests-MINGW (push) Has been cancelled
JerryScript CI / Win_x86-64_Tests (push) Has been cancelled
JerryScript CI / Win_x86-64_Tests_Debug (push) Has been cancelled
JerryScript CI / OSX_x86-64_Build_Correctness_Unit_Tests_Debug (push) Has been cancelled
JerryScript CI / Linux_AArch64_Tests_Debug (push) Failing after 14s
JerryScript CI / MbedOS_K64F_Build_Test (push) Failing after 15s
JerryScript CI / NuttX_STM32F4_Build_Test (push) Failing after 15s
JerryScript CI / Win_x86-64_Conformance_Tests_ESNext (push) Has been cancelled
JerryScript CI / OSX_x86-64_Build_Correctness_Unit_Tests (push) Has been cancelled
JerryScript CI / ESP8266_RTOS_SDK_Build_Test (push) Has been cancelled
JerryScript CI / ESP_IDF_Build_Test (push) Has been cancelled
JerryScript CI / Notification (push) Has been cancelled
JerryScript CI / RIOT_STM32F4_Build_Test (push) Has been cancelled

This commit is contained in:
2026-04-28 21:03:21 -05:00
parent 5cced37f43
commit 0ed67e6a53
12 changed files with 51 additions and 36 deletions
@@ -102,13 +102,13 @@ ecma_convert_number_to_typed_array_type (ecma_number_t num, /**< ecma_number arg
}
case ECMA_INT32_ARRAY:
{
return ecma_make_number_value ((int32_t) value);
return ecma_make_number_value ((ecma_number_t) (int32_t) value);
}
default:
{
JERRY_ASSERT (element_type == ECMA_UINT32_ARRAY);
return ecma_make_number_value (value);
return ecma_make_number_value ((ecma_number_t) value);
}
}
} /* ecma_convert_number_to_typed_array_type */
@@ -489,7 +489,7 @@ ecma_builtin_helper_string_find_last_index (ecma_string_t *original_str_p, /**<
const lit_utf8_byte_t *end_p = original_str_utf8_p + original_str_size;
const lit_utf8_byte_t *current_p = end_p;
for (ecma_number_t i = original_length; i > position; i--)
for (ecma_number_t i = (ecma_number_t) original_length; i > position; i--)
{
lit_utf8_decr (&current_p);
}
@@ -207,7 +207,7 @@ ecma_builtin_math_object_hypot (const ecma_value_t *arg, /**< arguments list */
result_num += arg_num * arg_num;
}
return ecma_make_number_value (sqrt (result_num));
return ecma_make_number_value ((ecma_number_t) sqrt (result_num));
} /* ecma_builtin_math_object_hypot */
/**
@@ -236,7 +236,7 @@ ecma_builtin_math_object_trunc (ecma_number_t arg)
return (ecma_number_t) -0.0;
}
return (ecma_number_t) arg - fmod (arg, 1);
return (ecma_number_t) arg - (ecma_number_t) fmod (arg, 1);
} /* ecma_builtin_math_object_trunc */
/**
@@ -392,7 +392,7 @@ ecma_builtin_math_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wi
break;
}
ecma_number_t fraction = fmod (x, ECMA_NUMBER_ONE);
ecma_number_t fraction = (ecma_number_t) fmod (x, ECMA_NUMBER_ONE);
if (ecma_number_is_zero (fraction))
{
@@ -504,7 +504,7 @@ ecma_builtin_math_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wi
{
uint32_t n = ecma_number_to_uint32 (x);
#if defined(__GNUC__) || defined(__clang__)
x = n ? __builtin_clz (n) : 32;
x = (ecma_number_t) (n ? __builtin_clz (n) : 32);
#elif defined(_WIN32)
unsigned long ret;
x = _BitScanReverse (&ret, n) ? 31 - ret : 32;
@@ -528,7 +528,7 @@ ecma_builtin_math_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wi
}
case ECMA_MATH_OBJECT_IMUL:
{
x = (int32_t) (ecma_number_to_uint32 (x) * ecma_number_to_uint32 (y));
x = (ecma_number_t) (int32_t) (ecma_number_to_uint32 (x) * ecma_number_to_uint32 (y));
break;
}
}
@@ -194,7 +194,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /
is_number_negative = true;
}
ecma_number_t integer_part = floor (this_arg_number);
ecma_number_t integer_part = (ecma_number_t) floor (this_arg_number);
ecma_number_t fraction_part = this_arg_number - integer_part;
uint8_t *integer_cursor_p = integer_digits + NUMBER_TO_STRING_MAX_DIGIT_COUNT;
@@ -208,8 +208,8 @@ ecma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /
do
{
fraction_part *= radix;
precision *= radix;
fraction_part *= (ecma_number_t) radix;
precision *= (ecma_number_t) radix;
digit = (uint8_t) floor (fraction_part);
@@ -255,11 +255,11 @@ ecma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /
}
}
while (ecma_number_biased_exp (ecma_number_to_binary (integer_part / radix))
while (ecma_number_biased_exp (ecma_number_to_binary (integer_part / (ecma_number_t) radix))
> ECMA_NUMBER_EXPONENT_BIAS + ECMA_NUMBER_FRACTION_WIDTH)
{
integer_zeros++;
integer_part /= radix;
integer_part /= (ecma_number_t) radix;
}
uint64_t integer_u64 = (uint64_t) integer_part;
@@ -1060,7 +1060,7 @@ ecma_builtin_string_prototype_object_substring (ecma_string_t *original_string_p
}
/* 6 */
start = (uint32_t) JERRY_MIN (JERRY_MAX (start_num, 0), len);
start = (uint32_t) JERRY_MIN (JERRY_MAX (start_num, (ecma_number_t) 0), (ecma_number_t) len);
/* 5 */
if (ecma_is_value_undefined (arg2))
@@ -1077,7 +1077,7 @@ ecma_builtin_string_prototype_object_substring (ecma_string_t *original_string_p
return ECMA_VALUE_ERROR;
}
/* 7 */
end = (uint32_t) JERRY_MIN (JERRY_MAX (end_num, 0), len);
end = (uint32_t) JERRY_MIN (JERRY_MAX (end_num, (ecma_number_t) 0), (ecma_number_t) len);
}
JERRY_ASSERT (start <= len && end <= len);
@@ -1321,7 +1321,7 @@ ecma_builtin_string_prototype_object_substr (ecma_string_t *this_string_p, /**<
lit_utf8_size_t this_len = ecma_string_get_length (this_string_p);
/* 5. */
uint32_t from = (uint32_t) ((start_num < 0) ? JERRY_MAX (this_len + start_num, 0) : start_num);
uint32_t from = (uint32_t) ((start_num < 0) ? JERRY_MAX ((ecma_number_t) this_len + start_num, (ecma_number_t) 0) : start_num);
if (from > this_len)
{
@@ -1329,7 +1329,7 @@ ecma_builtin_string_prototype_object_substr (ecma_string_t *this_string_p, /**<
}
/* 6. */
ecma_number_t to_num = JERRY_MIN (JERRY_MAX (length_num, 0), this_len - from);
ecma_number_t to_num = JERRY_MIN (JERRY_MAX (length_num, (ecma_number_t) 0), (ecma_number_t) (this_len - from));
/* 7. */
uint32_t to = from + (uint32_t) to_num;
@@ -234,7 +234,7 @@ ecma_builtin_typedarray_prototype_map (ecma_value_t this_arg, /**< this object *
}
// TODO: 22.2.3.18, 7-8.
ecma_value_t len = ecma_make_number_value (src_info_p->length);
ecma_value_t len = ecma_make_number_value ((ecma_number_t) src_info_p->length);
ecma_value_t new_typedarray = ecma_typedarray_species_create (this_arg, &len, 1);
ecma_free_value (len);
@@ -500,7 +500,7 @@ ecma_builtin_typedarray_prototype_filter (ecma_value_t this_arg, /**< this objec
ecma_fast_free_value (call_value);
}
ecma_value_t collected = ecma_make_number_value (collected_p->item_count);
ecma_value_t collected = ecma_make_number_value ((ecma_number_t) collected_p->item_count);
ret_value = ecma_typedarray_species_create (this_arg, &collected, 1);
ecma_free_value (collected);
@@ -1141,14 +1141,14 @@ ecma_builtin_typedarray_prototype_sort_compare_helper (ecma_value_t lhs, /**< le
#if JERRY_BUILTIN_BIGINT
if (ecma_is_value_bigint (lhs) && ecma_is_value_bigint (rhs))
{
return ecma_make_number_value (ecma_bigint_compare_to_bigint (lhs, rhs));
return ecma_make_number_value ((ecma_number_t) ecma_bigint_compare_to_bigint (lhs, rhs));
}
#endif /* JERRY_BUILTIN_BIGINT */
ecma_number_t result = ECMA_NUMBER_ZERO;
double lhs_value = (double) ecma_get_number_from_value (lhs);
double rhs_value = (double) ecma_get_number_from_value (rhs);
ecma_number_t lhs_value = ecma_get_number_from_value (lhs);
ecma_number_t rhs_value = ecma_get_number_from_value (rhs);
if (ecma_number_is_nan (lhs_value))
{
@@ -1482,7 +1482,7 @@ ecma_builtin_typedarray_prototype_index_of (ecma_typedarray_info_t *info_p, /**<
if (ecma_op_same_value_zero (args[0], element, true))
{
ecma_free_value (element);
return ecma_make_number_value (from_index);
return ecma_make_number_value ((ecma_number_t) from_index);
}
ecma_free_value (element);
@@ -1545,7 +1545,7 @@ ecma_builtin_typedarray_prototype_last_index_of (ecma_typedarray_info_t *info_p,
return ECMA_VALUE_ERROR;
}
if (info_p->length + to_int < 0)
if ((ecma_number_t) info_p->length + to_int < 0)
{
return ecma_make_integer_value (-1);
}
@@ -1690,7 +1690,7 @@ ecma_builtin_typedarray_prototype_slice (ecma_value_t this_arg, /**< this argume
int32_t distance = (int32_t) (relative_end - relative_start);
uint32_t count = distance > 0 ? (uint32_t) distance : 0;
ecma_value_t len = ecma_make_number_value (count);
ecma_value_t len = ecma_make_number_value ((ecma_number_t) count);
// TODO: 22.2.3.23, 12-13.
ecma_value_t new_typedarray = ecma_typedarray_species_create (this_arg, &len, 1);
ecma_free_value (len);