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:
@@ -84,7 +84,6 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
|
||||
uint32_t arguments_number) /**< length of arguments' list */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
JERRY_UNUSED (arguments_number);
|
||||
|
||||
if (builtin_routine_id < ECMA_REFLECT_OBJECT_CONSTRUCT)
|
||||
{
|
||||
@@ -95,8 +94,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
|
||||
}
|
||||
|
||||
/* 2. */
|
||||
ecma_string_t *name_str_p = ecma_op_to_property_key (((arguments_number > 1) ? arguments_list[1]
|
||||
: ECMA_VALUE_UNDEFINED));
|
||||
ecma_string_t *name_str_p = ecma_op_to_property_key (arguments_list[1]);
|
||||
|
||||
/* 3. */
|
||||
if (name_str_p == NULL)
|
||||
|
||||
Reference in New Issue
Block a user