Add %TypedArray%.prototype.sort([ compareFunction ]) support. (#2437)

JerryScript-DCO-1.0-Signed-off-by: Anthony Calandra anthony@anthony-calandra.com
This commit is contained in:
Anthony Calandra
2018-08-22 02:49:12 -04:00
committed by László Langó
parent 6e94414f9c
commit b2cf7eb659
7 changed files with 453 additions and 166 deletions
@@ -172,6 +172,20 @@ ecma_value_t
ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, const ecma_value_t *arguments_list_p,
ecma_length_t arguments_list_len);
/* ecma-builtin-helpers-sort.c */
/**
* Comparison callback function header for sorting helper routines.
*/
typedef ecma_value_t (*ecma_builtin_helper_sort_compare_fn_t)(ecma_value_t lhs, /**< left value */
ecma_value_t rhs, /**< right value */
ecma_value_t compare_func); /**< compare function */
ecma_value_t ecma_builtin_helper_array_heap_sort_helper (ecma_value_t *array_p,
uint32_t right,
ecma_value_t compare_func,
const ecma_builtin_helper_sort_compare_fn_t sort_cb);
/**
* @}
* @}