Introducing interfaces for invoking built-in functions and constructors.

Implementing property instantiation routine dispatcher for Global object.
Adding instantiation for 'undefined', 'NaN', 'Infinity' and built-in routine
properties of the Global Object. Implementing isNaN and isFinite built-in routines.
This commit is contained in:
Ruben Ayrapetyan
2014-09-19 18:10:49 +04:00
parent 1dd631178f
commit f46853bdd8
9 changed files with 557 additions and 178 deletions
+4 -3
View File
@@ -53,6 +53,7 @@ ecma_op_object_get (ecma_object_t *obj_p, /**< the object */
case ECMA_OBJECT_TYPE_GENERAL:
case ECMA_OBJECT_TYPE_ARRAY:
case ECMA_OBJECT_TYPE_STRING:
case ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION:
{
return ecma_op_general_object_get (obj_p, property_name_p);
}
@@ -64,7 +65,6 @@ ecma_op_object_get (ecma_object_t *obj_p, /**< the object */
case ECMA_OBJECT_TYPE_BOUND_FUNCTION:
case ECMA_OBJECT_TYPE_FUNCTION:
case ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION:
{
return ecma_op_function_object_get (obj_p, property_name_p);
}
@@ -129,9 +129,10 @@ ecma_op_object_get_own_property (ecma_object_t *obj_p, /**< the object */
if (unlikely (prop_p == NULL))
{
if (is_builtin)
if (is_builtin
&& type != ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION)
{
prop_p = ecma_object_try_to_get_non_instantiated_property (obj_p, property_name_p);
prop_p = ecma_builtin_try_to_instantiate_property (obj_p, property_name_p);
}
}