Skip to content

Commit 21222eb

Browse files
committed
Remove compact profile.
The standard doesn't defines ECMAScript Compact Profile as a subset of Ecma-262 Edition 5.1. Profile modes can be added easily like the minimal profile if required. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
1 parent 7f14a28 commit 21222eb

File tree

72 files changed

+237
-436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+237
-436
lines changed

docs/01.GETTING-STARTED.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ python tools/build.py --debug --lto=off
4242
python tools/build.py --cmake-param=CMAKE_PARAM
4343
```
4444

45-
##### Set an ECMAScript profile mode (full|compact|minimal):
45+
##### Set a profile mode (full|minimal):
4646

4747
```bash
48-
python tools/build.py --feature=full|compact|minimal
48+
python tools/build.py --feature=full|minimal
4949
```
5050

5151
##### Use (jerry|compiler-default|external libc) libc:

docs/04.INTERNALS.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,8 @@ Chunk size of the pool is 8 bytes (reduces fragmentation).
247247
### Number
248248

249249
There are two possible representation of numbers according to standard IEEE 754:
250-
251-
* 4-byte (float, compact profile)
252-
* 8-byte (double, full profile)
250+
The default is 8-byte (double),
251+
but the engine supports the 4-byte (single precision) representation by setting CONFIG_ECMA_NUMBER_TYPE as well.
253252

254253
![Number](img/number.png)
255254

jerry-core/CMakeLists.txt

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set(JERRY_CORE_NAME jerry-core)
1818
project (${JERRY_CORE_NAME} C)
1919

2020
# Optional features
21-
set(FEATURE_PROFILE "full" CACHE STRING "ES5.1 profile: full, compact, minimal")
21+
set(FEATURE_PROFILE "full" CACHE STRING "Profile types: full, minimal")
2222
set(FEATURE_ERROR_MESSAGES OFF CACHE BOOL "Enable error messages?")
2323
set(FEATURE_LOG OFF CACHE BOOL "Enable logging?")
2424
set(FEATURE_VALGRIND OFF CACHE BOOL "Enable Valgrind support?")
@@ -142,30 +142,20 @@ else()
142142
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_NDEBUG)
143143
endif()
144144

145-
# ES5.1 profiles
146-
# Compact profile
147-
if(FEATURE_PROFILE STREQUAL "compact")
148-
set(DEFINES_JERRY ${DEFINES_JERRY} CONFIG_ECMA_COMPACT_PROFILE)
149-
150-
# Minimal compact profile
151-
elseif(FEATURE_PROFILE STREQUAL "minimal")
152-
set(DEFINES_JERRY
153-
${DEFINES_JERRY}
154-
CONFIG_ECMA_COMPACT_PROFILE
155-
#
156-
# Date and RegExp built-in objects are also disabled in non-minimal compact profile build
157-
#
158-
# CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
159-
# CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
160-
#
161-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
162-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
163-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
164-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
165-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
166-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
167-
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN)
168-
145+
# Profile modes
146+
# Minimal profile
147+
if(FEATURE_PROFILE STREQUAL "minimal")
148+
set(DEFINES_JERRY ${DEFINES_JERRY}
149+
CONFIG_DISABLE_NUMBER_BUILTIN
150+
CONFIG_DISABLE_STRING_BUILTIN
151+
CONFIG_DISABLE_BOOLEAN_BUILTIN
152+
CONFIG_DISABLE_ERROR_BUILTINS
153+
CONFIG_DISABLE_ARRAY_BUILTIN
154+
CONFIG_DISABLE_MATH_BUILTIN
155+
CONFIG_DISABLE_JSON_BUILTIN
156+
CONFIG_DISABLE_DATE_BUILTIN
157+
CONFIG_DISABLE_REGEXP_BUILTIN
158+
CONFIG_DISABLE_ANNEXB_BUILTIN)
169159
elseif(NOT FEATURE_PROFILE STREQUAL "full")
170160
message(FATAL_ERROR "FEATURE_PROFILE='${FEATURE_PROFILE}' doesn't supported")
171161
endif()

jerry-core/config.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,6 @@
147147
*/
148148
// #define CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE
149149

150-
/**
151-
* Implementation should correspond to ECMA Compact Profile
152-
*/
153-
// #define CONFIG_ECMA_COMPACT_PROFILE
154-
155-
#ifdef CONFIG_ECMA_COMPACT_PROFILE
156-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
157-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN
158-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
159-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
160-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
161-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN
162-
// #define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
163-
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
164-
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
165-
#define CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ANNEXB_BUILTIN
166-
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
167-
168150
/**
169151
* Number of ecma values inlined into VM stack frame
170152
*/

jerry-core/ecma/base/ecma-gc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,10 @@ ecma_gc_run (jmem_free_unused_memory_severity_t severity) /**< gc severity */
568568

569569
JERRY_CONTEXT (ecma_gc_visited_flip_flag) = !JERRY_CONTEXT (ecma_gc_visited_flip_flag);
570570

571-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
571+
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
572572
/* Free RegExp bytecodes stored in cache */
573573
re_cache_gc_run ();
574-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
574+
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
575575
} /* ecma_gc_run */
576576

577577
/**

jerry-core/ecma/base/ecma-helpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,11 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
14671467
}
14681468
else
14691469
{
1470-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
1470+
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
14711471
re_compiled_code_t *re_bytecode_p = (re_compiled_code_t *) bytecode_p;
14721472

14731473
ecma_deref_ecma_string (ECMA_GET_NON_NULL_POINTER (ecma_string_t, re_bytecode_p->pattern_cp));
1474-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
1474+
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
14751475
}
14761476

14771477
jmem_heap_free_block (bytecode_p,

jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "ecma-try-catch-macro.h"
3131
#include "jrt.h"
3232

33-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
33+
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
3434

3535
#define ECMA_BUILTINS_INTERNAL
3636
#include "ecma-builtins-internal.h"
@@ -2768,4 +2768,4 @@ ecma_builtin_array_prototype_object_reduce_right (ecma_value_t this_arg, /**< th
27682768
* @}
27692769
*/
27702770

2771-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
2771+
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */

jerry-core/ecma/builtin-objects/ecma-builtin-array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "ecma-try-catch-macro.h"
2626
#include "jrt.h"
2727

28-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
28+
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
2929

3030
#define ECMA_BUILTINS_INTERNAL
3131
#include "ecma-builtins-internal.h"
@@ -107,4 +107,4 @@ ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**
107107
* @}
108108
*/
109109

110-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */
110+
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */

jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "ecma-try-catch-macro.h"
2626
#include "jrt.h"
2727

28-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
28+
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
2929

3030
#define ECMA_BUILTINS_INTERNAL
3131
#include "ecma-builtins-internal.h"
@@ -122,4 +122,4 @@ ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this
122122
* @}
123123
*/
124124

125-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
125+
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */

jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "ecma-try-catch-macro.h"
2626
#include "jrt.h"
2727

28-
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
28+
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
2929

3030
#define ECMA_BUILTINS_INTERNAL
3131
#include "ecma-builtins-internal.h"
@@ -97,4 +97,4 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /
9797
* @}
9898
*/
9999

100-
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN */
100+
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */

0 commit comments

Comments
 (0)