Providing cp_minimal build mode.

In the mode built-in objects except Global, Object, Object.prototype, Function,
Function.prototype, [[ThrowTypeError]] and CompactProfileError are disabled.

Making default builds (without cp cp_minimal modes set) to not define CONFIG_ECMA_COMPACT_PROFILE.
Removing some tests that depend on 'eval'-like functionality or CompactProfileError built-in from pre-commit testing.
This commit is contained in:
Ruben Ayrapetyan
2014-10-31 18:27:46 +03:00
parent 73084cb976
commit 05cf2dbe04
36 changed files with 241 additions and 50 deletions
+8
View File
@@ -112,6 +112,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
/** Initializing [[PrimitiveValue]] properties of built-in prototype objects */
switch (obj_builtin_id)
{
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
case ECMA_BUILTIN_ID_STRING_PROTOTYPE:
{
ecma_string_t *prim_prop_str_value_p = ecma_get_magic_string (ECMA_MAGIC_STRING__EMPTY);
@@ -122,6 +123,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
ECMA_SET_POINTER (prim_value_prop_p->u.internal_property.value, prim_prop_str_value_p);
break;
}
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN */
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
case ECMA_BUILTIN_ID_NUMBER_PROTOTYPE:
{
ecma_number_t *prim_prop_num_value_p = ecma_alloc_number ();
@@ -133,6 +137,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
ECMA_SET_POINTER (prim_value_prop_p->u.internal_property.value, prim_prop_num_value_p);
break;
}
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN */
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
case ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE:
{
ecma_property_t *prim_value_prop_p;
@@ -141,6 +148,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
prim_value_prop_p->u.internal_property.value = ECMA_SIMPLE_VALUE_FALSE;
break;
}
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
default:
{