Update Function.prototype.bind to conform ES6 requirements (#3504)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-01-13 11:43:11 +01:00
committed by Dániel Bátyai
parent d0e8629342
commit be83ff6b71
2 changed files with 76 additions and 1 deletions
@@ -208,7 +208,13 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
ecma_length_t arguments_number) /**< number of arguments */
{
/* 4. 11. 18. */
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);
ecma_object_t *prototype_obj_p;
#if ENABLED (JERRY_ES2015)
prototype_obj_p = ECMA_GET_POINTER (ecma_object_t, this_arg_obj_p->u2.prototype_cp);
#else /* !ENABLED (JERRY_ES2015) */
prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);
#endif /* ENABLED (JERRY_ES2015) */
ecma_object_t *function_p;
ecma_extended_object_t *ext_function_p;