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:
Péter Gál
2019-07-01 13:12:19 +02:00
committed by Dániel Bátyai
parent 1ea77cc490
commit eef1efa394
29 changed files with 175 additions and 160 deletions
+2 -2
View File
@@ -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)
{
+4 -4
View File
@@ -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.
+4 -4
View File
@@ -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);