Replace vera++ with clang-format (#4518)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
@@ -19,15 +19,17 @@
|
||||
#ifndef JCONTEXT_H
|
||||
#define JCONTEXT_H
|
||||
|
||||
#include "debugger.h"
|
||||
#include "jerryscript-debugger-transport.h"
|
||||
|
||||
#include "ecma-builtins.h"
|
||||
#include "ecma-helpers.h"
|
||||
#include "ecma-jobqueue.h"
|
||||
|
||||
#include "debugger.h"
|
||||
#include "jmem.h"
|
||||
#include "js-parser-internal.h"
|
||||
#include "re-bytecode.h"
|
||||
#include "vm-defines.h"
|
||||
#include "jerryscript-debugger-transport.h"
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
/** \addtogroup context Context
|
||||
* @{
|
||||
@@ -58,11 +60,11 @@
|
||||
* to try and reduce clutter from unreachable objects. If the allocated memory can't be reduced below the limit,
|
||||
* then the current limit will be incremented by CONFIG_MEM_HEAP_LIMIT.
|
||||
*/
|
||||
#if defined (JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0)
|
||||
#if defined(JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0)
|
||||
#define CONFIG_GC_LIMIT JERRY_GC_LIMIT
|
||||
#else
|
||||
#else /* !(defined(JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0)) */
|
||||
#define CONFIG_GC_LIMIT (JERRY_MIN (CONFIG_MEM_HEAP_SIZE / 32, CONFIG_MAX_GC_LIMIT))
|
||||
#endif
|
||||
#endif /* defined(JERRY_GC_LIMIT) && (JERRY_GC_LIMIT != 0) */
|
||||
|
||||
/**
|
||||
* Amount of newly allocated objects since the last GC run, represented as a fraction of all allocated objects,
|
||||
@@ -98,8 +100,7 @@ typedef struct jerry_context_data_header
|
||||
const jerry_context_data_manager_t *manager_p; /**< manager responsible for deleting this item */
|
||||
} jerry_context_data_header_t;
|
||||
|
||||
#define JERRY_CONTEXT_DATA_HEADER_USER_DATA(item_p) \
|
||||
((uint8_t *) (item_p + 1))
|
||||
#define JERRY_CONTEXT_DATA_HEADER_USER_DATA(item_p) ((uint8_t *) (item_p + 1))
|
||||
|
||||
/**
|
||||
* First non-external member of the jerry context
|
||||
@@ -132,7 +133,7 @@ struct jerry_context_t
|
||||
#if JERRY_CPOINTER_32_BIT
|
||||
jmem_pools_chunk_t *jmem_free_16_byte_chunk_p; /**< list of free sixteen byte pool chunks */
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
const lit_utf8_byte_t * const *lit_magic_string_ex_array; /**< array of external magic strings */
|
||||
const lit_utf8_byte_t *const *lit_magic_string_ex_array; /**< array of external magic strings */
|
||||
const lit_utf8_size_t *lit_magic_string_ex_sizes; /**< external magic string lengths */
|
||||
jmem_cpointer_t ecma_gc_objects_cp; /**< List of currently alive objects. */
|
||||
jmem_cpointer_t string_list_first_cp; /**< first item of the literal string list */
|
||||
@@ -199,11 +200,11 @@ struct jerry_context_t
|
||||
|
||||
#if JERRY_BUILTIN_TYPEDARRAY
|
||||
uint32_t arraybuffer_compact_allocation_limit; /**< maximum size of compact allocation */
|
||||
jerry_arraybuffer_allocate_t arraybuffer_allocate_callback; /**< callback for allocating
|
||||
* arraybuffer memory */
|
||||
jerry_arraybuffer_allocate_t arraybuffer_allocate_callback; /**< callback for allocating
|
||||
* arraybuffer memory */
|
||||
jerry_arraybuffer_free_t arraybuffer_free_callback; /**< callback for freeing arraybuffer memory */
|
||||
void *arraybuffer_allocate_callback_user_p; /**< user pointer passed to arraybuffer_allocate_callback
|
||||
* and arraybuffer_free_callback functions */
|
||||
void *arraybuffer_allocate_callback_user_p; /**< user pointer passed to arraybuffer_allocate_callback
|
||||
* and arraybuffer_free_callback functions */
|
||||
#endif /* JERRY_BUILTIN_TYPEDARRAY */
|
||||
|
||||
#if JERRY_VM_EXEC_STOP
|
||||
@@ -220,7 +221,7 @@ struct jerry_context_t
|
||||
#endif /* JERRY_VM_THROW */
|
||||
|
||||
#if (JERRY_STACK_LIMIT != 0)
|
||||
uintptr_t stack_base; /**< stack base marker */
|
||||
uintptr_t stack_base; /**< stack base marker */
|
||||
#endif /* (JERRY_STACK_LIMIT != 0) */
|
||||
|
||||
#if JERRY_DEBUGGER
|
||||
@@ -309,14 +310,14 @@ extern jerry_context_t jerry_global_context;
|
||||
#if !JERRY_SYSTEM_ALLOCATOR
|
||||
|
||||
/**
|
||||
* Size of heap
|
||||
*/
|
||||
#define JMEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_SIZE))
|
||||
* Size of heap
|
||||
*/
|
||||
#define JMEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_SIZE))
|
||||
|
||||
/**
|
||||
* Calculate heap area size, leaving space for a pointer to the free list
|
||||
*/
|
||||
#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)
|
||||
#define JMEM_HEAP_AREA_SIZE (JMEM_HEAP_SIZE - JMEM_ALIGNMENT)
|
||||
|
||||
struct jmem_heap_t
|
||||
{
|
||||
@@ -338,26 +339,19 @@ extern jmem_heap_t jerry_global_heap;
|
||||
|
||||
#endif /* JERRY_EXTERNAL_CONTEXT */
|
||||
|
||||
void
|
||||
jcontext_set_exception_flag (bool is_exception);
|
||||
void jcontext_set_exception_flag (bool is_exception);
|
||||
|
||||
void
|
||||
jcontext_set_abort_flag (bool is_abort);
|
||||
void jcontext_set_abort_flag (bool is_abort);
|
||||
|
||||
bool
|
||||
jcontext_has_pending_exception (void);
|
||||
bool jcontext_has_pending_exception (void);
|
||||
|
||||
bool
|
||||
jcontext_has_pending_abort (void);
|
||||
bool jcontext_has_pending_abort (void);
|
||||
|
||||
void
|
||||
jcontext_raise_exception (ecma_value_t error);
|
||||
void jcontext_raise_exception (ecma_value_t error);
|
||||
|
||||
void
|
||||
jcontext_release_exception (void);
|
||||
void jcontext_release_exception (void);
|
||||
|
||||
ecma_value_t
|
||||
jcontext_take_exception (void);
|
||||
ecma_value_t jcontext_take_exception (void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user