Skip to content

Commit 0219f37

Browse files
author
Roland Takacs
committed
Remove template expression from jerry_ref_unused_variables.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
1 parent d038284 commit 0219f37

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

jerry-core/ecma/builtin-objects/ecma-builtins-internal.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,4 @@ extern void \
9393
ecma_builtin_ ## lowercase_name ## _sort_property_names (void);
9494
#include "ecma-builtins.inc.h"
9595

96-
97-
#ifndef CONFIG_ECMA_COMPACT_PROFILE
98-
# define ECMA_BUILTIN_CP_UNIMPLEMENTED(...) \
99-
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS ("Built-in is not implemented.", __VA_ARGS__)
100-
#else /* !CONFIG_ECMA_COMPACT_PROFILE */
101-
# define ECMA_BUILTIN_CP_UNIMPLEMENTED(...) \
102-
{ \
103-
if (false) \
104-
{ \
105-
jerry_ref_unused_variables (0, __VA_ARGS__); \
106-
} \
107-
ecma_object_t *cp_error_p = ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR); \
108-
return ecma_make_throw_obj_completion_value (cp_error_p); \
109-
}
110-
#endif /* CONFIG_ECMA_COMPACT_PROFILE */
111-
11296
#endif /* !ECMA_BUILTINS_INTERNAL_H */

jerry-core/jrt/jrt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ extern void __noreturn jerry_unimplemented (const char *, const char *, const ch
126126
/**
127127
* Mark for unreachable points and unimplemented cases
128128
*/
129-
template<typename... values> extern void jerry_ref_unused_variables (const values & ... unused);
129+
extern void jerry_ref_unused_variables (void *, ...);
130130

131131
#ifndef JERRY_NDEBUG
132132
#define JERRY_UNREACHABLE() \

jerry-core/parser/regexp/re-compiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ re_dump_bytecode (re_bytecode_ctx_t *bc_ctx);
6060
static uint8_t *
6161
re_realloc_regexp_bytecode_block (re_bytecode_ctx_t *bc_ctx_p) /**< RegExp bytecode context */
6262
{
63-
JERRY_ASSERT (bc_ctx_p->block_end_p - bc_ctx_p->block_start_p >= 0);
63+
JERRY_ASSERT (bc_ctx_p->block_end_p >= bc_ctx_p->block_start_p);
6464
size_t old_size = (size_t) (bc_ctx_p->block_end_p - bc_ctx_p->block_start_p);
6565

6666
/* If one of the members of RegExp bytecode context is NULL, then all member should be NULL
@@ -69,7 +69,7 @@ re_realloc_regexp_bytecode_block (re_bytecode_ctx_t *bc_ctx_p) /**< RegExp bytec
6969
|| (bc_ctx_p->current_p && bc_ctx_p->block_end_p && bc_ctx_p->block_start_p));
7070

7171
size_t new_block_size = old_size + REGEXP_BYTECODE_BLOCK_SIZE;
72-
JERRY_ASSERT (bc_ctx_p->current_p - bc_ctx_p->block_start_p >= 0);
72+
JERRY_ASSERT (bc_ctx_p->current_p >= bc_ctx_p->block_start_p);
7373
size_t current_ptr_offset = (size_t) (bc_ctx_p->current_p - bc_ctx_p->block_start_p);
7474

7575
uint8_t *new_block_start_p = (uint8_t *) mem_heap_alloc_block (new_block_size,

0 commit comments

Comments
 (0)