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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user