Optimize ecma_op_function_call (#4817)

Remove redundant isCallable checks

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2021-11-04 17:26:28 +01:00
committed by GitHub
parent 7ea0000ee0
commit bc091e1742
11 changed files with 326 additions and 371 deletions
+2 -10
View File
@@ -3296,18 +3296,10 @@ ecma_op_invoke (ecma_value_t object, /**< Object value */
}
/* 4. */
if (!ecma_op_is_callable (func))
{
ecma_free_value (func);
ecma_deref_object (object_p);
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not callable"));
}
ecma_object_t *func_obj_p = ecma_get_object_from_value (func);
ecma_value_t call_result = ecma_op_function_call (func_obj_p, this_arg, args_p, args_len);
ecma_value_t call_result = ecma_op_function_validated_call (func, this_arg, args_p, args_len);
ecma_free_value (func);
ecma_deref_object (object_p);
ecma_deref_object (func_obj_p);
return call_result;
} /* ecma_op_invoke */