Implement BigInt64 and BigUint64 typedArrays (#4151)

Also implemented ToBigInt conversion method based on ECMA-262 v11, 7.1.13

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-08-24 18:03:12 +02:00
committed by GitHub
parent 55b6b1aed7
commit 85981457e6
29 changed files with 1028 additions and 733 deletions
@@ -311,12 +311,18 @@ ecma_op_dataview_get_set_view_value (ecma_value_t view, /**< the operation's 'vi
JERRY_VLA (lit_utf8_byte_t, swap_block_p, element_size);
memcpy (swap_block_p, block_p, element_size * sizeof (lit_utf8_byte_t));
ecma_dataview_swap_order (system_is_little_endian, is_little_endian, element_size, swap_block_p);
return ecma_make_number_value (ecma_get_typedarray_element (swap_block_p, id));
return ecma_get_typedarray_element (swap_block_p, id);
}
if (ecma_is_value_number (value_to_set))
{
ecma_set_typedarray_element (block_p, ecma_get_number_from_value (value_to_set), id);
ecma_value_t set_element = ecma_set_typedarray_element (block_p, value_to_set, id);
if (ECMA_IS_VALUE_ERROR (set_element))
{
return set_element;
}
ecma_dataview_swap_order (system_is_little_endian, is_little_endian, element_size, block_p);
}