Rework usages/naming of configuration macros [part 3] (#2927)
Reworked the JERRY_DEBUGGER macro to be a 0/1 switch. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
@@ -1056,14 +1056,14 @@ ecma_gc_run (jmem_free_unused_memory_severity_t severity) /**< gc severity */
|
||||
void
|
||||
ecma_free_unused_memory (jmem_free_unused_memory_severity_t severity) /**< severity of the request */
|
||||
{
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
while ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& JERRY_CONTEXT (debugger_byte_code_free_tail) != ECMA_NULL_POINTER)
|
||||
{
|
||||
/* Wait until all byte code is freed or the connection is aborted. */
|
||||
jerry_debugger_receive (NULL);
|
||||
}
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
|
||||
if (severity == JMEM_FREE_UNUSED_MEMORY_SEVERITY_LOW)
|
||||
{
|
||||
|
||||
@@ -81,12 +81,12 @@ typedef enum
|
||||
ECMA_TYPE___MAX = ECMA_TYPE_ERROR /** highest value for ecma types */
|
||||
} ecma_type_t;
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
/**
|
||||
* Shift for scope chain index part in ecma_parse_opts
|
||||
*/
|
||||
#define ECMA_PARSE_CHAIN_INDEX_SHIFT 16
|
||||
#endif
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
|
||||
/**
|
||||
* Option flags for script parsing.
|
||||
@@ -712,9 +712,9 @@ typedef enum
|
||||
/**
|
||||
* Non closure flag for debugger.
|
||||
*/
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#define ECMA_OBJECT_FLAG_NON_CLOSURE 0x20
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
|
||||
/**
|
||||
* Value for increasing or decreasing the object reference counter.
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include "re-compiler.h"
|
||||
#include "ecma-builtins.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
#include "debugger.h"
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -1548,7 +1548,7 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
&& !(bytecode_p->status_flags & CBC_CODE_FLAGS_DEBUGGER_IGNORE)
|
||||
&& jerry_debugger_send_function_cp (JERRY_DEBUGGER_RELEASE_BYTE_CODE_CP, bytecode_p))
|
||||
@@ -1580,7 +1580,7 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
JERRY_CONTEXT (debugger_byte_code_free_head) = byte_code_free_cp;
|
||||
return;
|
||||
}
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
|
||||
#if ENABLED (JERRY_MEM_STATS)
|
||||
jmem_stats_free_byte_code_bytes (((size_t) bytecode_p->size) << JMEM_ALIGNMENT_LOG);
|
||||
|
||||
@@ -823,9 +823,9 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if ENABLED (JERRY_DEBUGGER)
|
||||
JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_EXCEPTION_THROWN);
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* ENABLED (JERRY_DEBUGGER) */
|
||||
return ret_value;
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
|
||||
Reference in New Issue
Block a user