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
+31
View File
@@ -171,6 +171,21 @@ else
OPTION_FLOAT64 := disable
endif
# CompactProfile mode
ifeq ($(filter cp,$(TARGET_MODS)), cp)
OPTION_COMPACT_PROFILE := enable
else
OPTION_COMPACT_PROFILE := disable
endif
# minimal CompactProfile mode
ifeq ($(filter cp_minimal,$(TARGET_MODS)), cp_minimal)
OPTION_COMPACT_PROFILE := enable
OPTION_CP_MINIMAL := enable
else
OPTION_CP_MINIMAL := disable
endif
# Enabling float64 mode for unittests
ifeq ($(filter-out $(TESTS_TARGET),$(TARGET_MODE)),)
OPTION_FLOAT64 := enable
@@ -355,6 +370,22 @@ ifeq ($(OPTION_FLOAT64),enable)
DEFINES_JERRY += -DCONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT64
endif
ifeq ($(OPTION_COMPACT_PROFILE),enable)
DEFINES_JERRY += -DCONFIG_ECMA_COMPACT_PROFILE
endif
ifeq ($(OPTION_CP_MINIMAL),enable)
DEFINES_JERRY += -DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN \
-DCONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
endif
ifeq ($(OPTION_MCU),disable)
MACHINE_TYPE=$(shell uname -m)
ifeq ($(MACHINE_TYPE),x86_64)