Remove the ENABLED/DISABLED macros (#4515)

The removal of these macros enabled cppcheck to reveal new errors.
These errors are also fixed by the patch.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-02-04 23:47:05 +01:00
committed by GitHub
parent e01c2549d7
commit 0628ae1e7b
337 changed files with 5186 additions and 5191 deletions
+6 -6
View File
@@ -44,11 +44,11 @@ typedef enum
VM_FRAME_CTX_SHARED_DIRECT_EVAL = (1 << 1), /**< direct eval call */
VM_FRAME_CTX_SHARED_FREE_THIS = (1 << 2), /**< free this binding */
VM_FRAME_CTX_SHARED_FREE_LOCAL_ENV = (1 << 3), /**< free local environment */
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
VM_FRAME_CTX_SHARED_NON_ARROW_FUNC = (1 << 4), /**< non-arrow function */
VM_FRAME_CTX_SHARED_HERITAGE_PRESENT = (1 << 5), /**< class heritage present */
VM_FRAME_CTX_SHARED_HAS_CLASS_FIELDS = (1 << 6), /**< has class fields */
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
} vm_frame_ctx_shared_flags_t;
/**
@@ -71,7 +71,7 @@ typedef struct
uint32_t arg_list_len; /**< arguments list length */
} vm_frame_ctx_shared_args_t;
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
#define VM_FRAME_CTX_GET_FUNCTION_OBJECT(frame_ctx_p) \
(((vm_frame_ctx_shared_args_t *) (frame_ctx_p)->shared_p)->function_object_p)
@@ -91,7 +91,7 @@ typedef struct
#define VM_GET_COMPUTED_CLASS_FIELDS(frame_ctx_p) \
(((vm_frame_ctx_shared_class_fields_t *) ((frame_ctx_p)->shared_p))->computed_class_fields_p)
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
/**
* Flag bits of vm_frame_ctx_t
@@ -116,9 +116,9 @@ typedef struct vm_frame_ctx_t
struct vm_frame_ctx_t *prev_context_p; /**< previous context */
ecma_value_t this_binding; /**< this binding */
ecma_value_t block_result; /**< block result */
#if ENABLED (JERRY_LINE_INFO)
#if JERRY_LINE_INFO
uint32_t current_line; /**< currently executed line */
#endif /* ENABLED (JERRY_LINE_INFO) */
#endif /* JERRY_LINE_INFO */
uint16_t context_depth; /**< current context depth */
uint8_t status_flags; /**< combination of vm_frame_ctx_flags_t bits */
uint8_t call_operation; /**< perform a call or construct operation */