From ee93cb6320a212fb4935778cedf9a8ca813617d0 Mon Sep 17 00:00:00 2001 From: Robert Sipka Date: Tue, 13 Dec 2016 10:05:59 +0100 Subject: [PATCH] Add `JERRY_FEATURE_JS_PARSER` to compile time enabled feature types. (#1487) JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com --- docs/02.API-REFERENCE.md | 3 ++- jerry-core/jerry-api.h | 3 ++- jerry-core/jerry.c | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/02.API-REFERENCE.md b/docs/02.API-REFERENCE.md index d46c28fbe..2e0494d22 100644 --- a/docs/02.API-REFERENCE.md +++ b/docs/02.API-REFERENCE.md @@ -26,8 +26,9 @@ Possible types of an error: Possible compile time enabled feature types: - - JERRY_FEATURE_ERROR_MESSAGES - error messages - JERRY_FEATURE_CPOINTER_32_BIT - 32 bit compressed pointers + - JERRY_FEATURE_ERROR_MESSAGES - error messages + - JERRY_FEATURE_JS_PARSER - js-parser - JERRY_FEATURE_MEM_STATS - memory statistics - JERRY_FEATURE_PARSER_DUMP - parser byte-code dumps - JERRY_FEATURE_REGEXP_DUMP - regexp byte-code dumps diff --git a/jerry-core/jerry-api.h b/jerry-core/jerry-api.h index bff8d419e..cd160f409 100644 --- a/jerry-core/jerry-api.h +++ b/jerry-core/jerry-api.h @@ -69,8 +69,9 @@ typedef enum typedef enum { - JERRY_FEATURE_ERROR_MESSAGES, /**< error messages */ JERRY_FEATURE_CPOINTER_32_BIT, /**< 32 bit compressed pointers */ + JERRY_FEATURE_ERROR_MESSAGES, /**< error messages */ + JERRY_FEATURE_JS_PARSER, /**< js-parser */ JERRY_FEATURE_MEM_STATS, /**< memory statistics */ JERRY_FEATURE_PARSER_DUMP, /**< parser byte-code dumps */ JERRY_FEATURE_REGEXP_DUMP, /**< regexp byte-code dumps */ diff --git a/jerry-core/jerry.c b/jerry-core/jerry.c index ca691dc5f..7ef905b73 100644 --- a/jerry-core/jerry.c +++ b/jerry-core/jerry.c @@ -515,12 +515,15 @@ bool jerry_is_feature_enabled (const jerry_feature_t feature) JERRY_ASSERT (feature < JERRY_FEATURE__COUNT); return (false -#ifdef JERRY_ENABLE_ERROR_MESSAGES - || feature == JERRY_FEATURE_ERROR_MESSAGES -#endif /* JERRY_ENABLE_ERROR_MESSAGES */ #ifdef JERRY_CPOINTER_32_BIT || feature == JERRY_FEATURE_CPOINTER_32_BIT #endif /* JERRY_CPOINTER_32_BIT */ +#ifdef JERRY_ENABLE_ERROR_MESSAGES + || feature == JERRY_FEATURE_ERROR_MESSAGES +#endif /* JERRY_ENABLE_ERROR_MESSAGES */ +#ifdef JERRY_JS_PARSER + || feature == JERRY_FEATURE_JS_PARSER +#endif /* JERRY_JS_PARSER */ #ifdef JMEM_STATS || feature == JERRY_FEATURE_MEM_STATS #endif /* JMEM_STATS */