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
+8 -8
View File
@@ -27,7 +27,7 @@
* @{
*/
#if ENABLED (JERRY_SNAPSHOT_SAVE)
#if JERRY_SNAPSHOT_SAVE
/**
* Snapshot literal - offset map
*/
@@ -36,31 +36,31 @@ typedef struct
ecma_value_t literal_id; /**< literal id */
ecma_value_t literal_offset; /**< literal offset */
} lit_mem_to_snapshot_id_map_entry_t;
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
#endif /* JERRY_SNAPSHOT_SAVE */
void ecma_finalize_lit_storage (void);
ecma_value_t ecma_find_or_create_literal_string (const lit_utf8_byte_t *chars_p, lit_utf8_size_t size);
ecma_value_t ecma_find_or_create_literal_number (ecma_number_t number_arg);
#if ENABLED (JERRY_BUILTIN_BIGINT)
#if JERRY_BUILTIN_BIGINT
ecma_value_t ecma_find_or_create_literal_bigint (ecma_value_t bigint);
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
#endif /* JERRY_BUILTIN_BIGINT */
#if ENABLED (JERRY_SNAPSHOT_SAVE)
#if JERRY_SNAPSHOT_SAVE
void ecma_save_literals_append_value (ecma_value_t value, ecma_collection_t *lit_pool_p);
void ecma_save_literals_add_compiled_code (const ecma_compiled_code_t *compiled_code_p,
ecma_collection_t *lit_pool_p);
bool ecma_save_literals_for_snapshot (ecma_collection_t *lit_pool_p, uint32_t *buffer_p, size_t buffer_size,
size_t *in_out_buffer_offset_p, lit_mem_to_snapshot_id_map_entry_t **out_map_p,
uint32_t *out_map_len_p);
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
#endif /* JERRY_SNAPSHOT_SAVE */
#if ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE)
#if JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE
ecma_value_t
ecma_snapshot_get_literal (const uint8_t *literal_base_p, ecma_value_t literal_value);
ecma_value_t *
ecma_snapshot_resolve_serializable_values (ecma_compiled_code_t *compiled_code_p, uint8_t *byte_code_end_p);
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) || ENABLED (JERRY_SNAPSHOT_SAVE) */
#endif /* JERRY_SNAPSHOT_EXEC || JERRY_SNAPSHOT_SAVE */
/**
* @}