Implementing [[ThrowTypeError]] built-in Function object.

This commit is contained in:
Ruben Ayrapetyan
2014-10-30 17:14:06 +03:00
parent 4625d5b90a
commit ac710dd0b5
7 changed files with 141 additions and 18 deletions
+2 -15
View File
@@ -252,7 +252,7 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[], /**< f
// 19.
if (is_strict)
{
ecma_object_t *thrower_p = ecma_op_get_throw_type_error ();
ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);
prop_desc = ecma_make_empty_property_descriptor ();
{
@@ -269,7 +269,7 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[], /**< f
prop_desc.set_p = thrower_p;
}
ecma_string_t *magic_string_caller_p =ecma_get_magic_string (ECMA_MAGIC_STRING_CALLER) ;
ecma_string_t *magic_string_caller_p = ecma_get_magic_string (ECMA_MAGIC_STRING_CALLER);
ecma_op_object_define_own_property (f,
magic_string_caller_p,
prop_desc,
@@ -769,19 +769,6 @@ ecma_op_function_declaration (ecma_object_t *lex_env_p, /**< lexical environment
return ret_value;
} /* ecma_op_function_declaration */
/**
* Get [[ThrowTypeError]] Function Object
*
* @return pointer to unique [[ThrowTypeError]] Function Object
*/
ecma_object_t*
ecma_op_get_throw_type_error (void)
{
TODO(Create [[ThrowTypeError]] during engine initialization and return it from here);
JERRY_UNIMPLEMENTED("Type error thrower is not implemented.");
} /* ecma_op_get_throw_type_error */
/**
* @}
* @}