Remove redundant checks from builtin-dispatchers (#4741)

We don't need to check arguments length inside the custom dispatchers,
because we have already checked within ecma_bultin_dispatch_routine.

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
This commit is contained in:
batizdaniel
2021-08-30 14:13:31 +02:00
committed by GitHub
parent 8cbe1b59c1
commit bf049fbe2d
22 changed files with 66 additions and 82 deletions
@@ -550,13 +550,15 @@ ecma_builtin_array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in w
* passed to routine */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
switch (builtin_routine_id)
{
case ECMA_ARRAY_ROUTINE_IS_ARRAY:
{
JERRY_UNUSED (this_arg);
return arguments_number > 0 ? ecma_is_value_array (arguments_list_p[0]) : ECMA_VALUE_FALSE;
return ecma_is_value_array (arguments_list_p[0]);
}
#if JERRY_ESNEXT
case ECMA_ARRAY_ROUTINE_FROM: