Require JERRY_JS_PARSER macro to be defined (#1639)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
committed by
László Langó
parent
ca2b057356
commit
6254748081
@@ -155,8 +155,10 @@ endif()
|
||||
|
||||
# JS-Parser
|
||||
if(FEATURE_JS_PARSER)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_JS_PARSER)
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_JS_PARSER=1)
|
||||
else()
|
||||
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_JS_PARSER=0)
|
||||
|
||||
if(NOT FEATURE_SNAPSHOT_EXEC MATCHES ON)
|
||||
set(FEATURE_SNAPSHOT_EXEC ON)
|
||||
message(STATUS "JS-Parser has been disabled, snapshot is now on")
|
||||
|
||||
@@ -81,7 +81,7 @@ ecma_op_eval_chars_buffer (const lit_utf8_byte_t *code_p, /**< code characters b
|
||||
bool is_direct, /**< is eval called directly (ECMA-262 v5, 15.1.2.1.1) */
|
||||
bool is_called_from_strict_mode_code) /**< is eval is called from strict mode code */
|
||||
{
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
JERRY_ASSERT (code_p != NULL);
|
||||
|
||||
ecma_compiled_code_t *bytecode_data_p;
|
||||
|
||||
+6
-4
@@ -50,9 +50,11 @@ JERRY_STATIC_ASSERT ((int) ECMA_ERROR_COMMON == (int) JERRY_ERROR_COMMON
|
||||
&& (int) ECMA_ERROR_URI == (int) JERRY_ERROR_URI,
|
||||
ecma_standard_error_t_must_be_equal_to_jerry_error_t);
|
||||
|
||||
#if !defined (JERRY_JS_PARSER) && !defined (JERRY_ENABLE_SNAPSHOT_EXEC)
|
||||
#ifndef JERRY_JS_PARSER
|
||||
#error JERRY_JS_PARSER must be defined with 0 (disabled) or 1 (enabled)
|
||||
#elif !JERRY_JS_PARSER && !defined (JERRY_ENABLE_SNAPSHOT_EXEC)
|
||||
#error JERRY_JS_PARSER or JERRY_ENABLE_SNAPSHOT_EXEC must be defined!
|
||||
#endif /* !JERRY_JS_PARSER && !JERRY_ENABLE_SNAPSHOT_EXEC */
|
||||
#endif /* !JERRY_JS_PARSER */
|
||||
|
||||
#ifdef JERRY_ENABLE_ERROR_MESSAGES
|
||||
|
||||
@@ -269,7 +271,7 @@ jerry_parse (const jerry_char_t *source_p, /**< script source */
|
||||
size_t source_size, /**< script source size */
|
||||
bool is_strict) /**< strict mode */
|
||||
{
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
jerry_assert_api_available ();
|
||||
|
||||
ecma_compiled_code_t *bytecode_data_p;
|
||||
@@ -566,7 +568,7 @@ bool jerry_is_feature_enabled (const jerry_feature_t feature)
|
||||
#ifdef JERRY_ENABLE_ERROR_MESSAGES
|
||||
|| feature == JERRY_FEATURE_ERROR_MESSAGES
|
||||
#endif /* JERRY_ENABLE_ERROR_MESSAGES */
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|| feature == JERRY_FEATURE_JS_PARSER
|
||||
#endif /* JERRY_JS_PARSER */
|
||||
#ifdef JMEM_STATS
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "common.h"
|
||||
#include "ecma-helpers.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "js-parser-internal.h"
|
||||
#include "lit-char-helpers.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup mem Memory allocation
|
||||
* @{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#include "jcontext.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "jerry-debugger.h"
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
|
||||
/** \addtogroup parser Parser
|
||||
* @{
|
||||
@@ -2369,7 +2369,7 @@ parser_parse_script (const uint8_t *source_p, /**< source code */
|
||||
bool is_strict, /**< strict mode */
|
||||
ecma_compiled_code_t **bytecode_data_p) /**< [out] JS bytecode */
|
||||
{
|
||||
#ifdef JERRY_JS_PARSER
|
||||
#if JERRY_JS_PARSER
|
||||
parser_error_location_t parser_error;
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
|
||||
Reference in New Issue
Block a user