Remove shadowed declarations, undefined identifiers, and specify argument types where it is required. (#1601)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -192,7 +192,7 @@ parser_flush_cbc (parser_context_t *context_p) /**< context */
|
||||
{
|
||||
literal_index = context_p->last_cbc.third_literal_index;
|
||||
|
||||
lexer_literal_t *literal_p = PARSER_GET_LITERAL (literal_index);
|
||||
literal_p = PARSER_GET_LITERAL (literal_index);
|
||||
JERRY_DEBUG_MSG (" idx:%d->", literal_index);
|
||||
util_print_literal (literal_p);
|
||||
}
|
||||
@@ -640,7 +640,7 @@ parser_set_continues_to_current_position (parser_context_t *context_p, /**< cont
|
||||
}
|
||||
} /* parser_set_continues_to_current_position */
|
||||
|
||||
#if JERRY_ENABLE_ERROR_MESSAGES
|
||||
#ifdef JERRY_ENABLE_ERROR_MESSAGES
|
||||
/**
|
||||
* Returns with the string representation of the error
|
||||
*/
|
||||
|
||||
@@ -1563,16 +1563,16 @@ parser_post_processing (parser_context_t *context_p) /**< context */
|
||||
{
|
||||
/* These opcodes are deleted from the stream. */
|
||||
#if PARSER_MAXIMUM_CODE_SIZE <= 65535
|
||||
size_t length = 3;
|
||||
size_t counter = 3;
|
||||
#else /* PARSER_MAXIMUM_CODE_SIZE > 65535 */
|
||||
size_t length = 4;
|
||||
size_t counter = 4;
|
||||
#endif /* PARSER_MAXIMUM_CODE_SIZE <= 65535 */
|
||||
|
||||
do
|
||||
{
|
||||
PARSER_NEXT_BYTE_UPDATE (page_p, offset, real_offset);
|
||||
}
|
||||
while (--length > 0);
|
||||
while (--counter > 0);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -1586,8 +1586,8 @@ parser_post_processing (parser_context_t *context_p) /**< context */
|
||||
#ifdef JERRY_DEBUGGER
|
||||
if (opcode == CBC_BREAKPOINT_DISABLED)
|
||||
{
|
||||
uint32_t offset = (uint32_t) (((uint8_t *) dst_p) - ((uint8_t *) compiled_code_p) - 1);
|
||||
parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST, offset);
|
||||
uint32_t bp_offset = (uint32_t) (((uint8_t *) dst_p) - ((uint8_t *) compiled_code_p) - 1);
|
||||
parser_append_breakpoint_info (context_p, JERRY_DEBUGGER_BREAKPOINT_OFFSET_LIST, bp_offset);
|
||||
}
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
|
||||
@@ -2087,8 +2087,8 @@ parser_parse_function (parser_context_t *context_p, /**< context */
|
||||
* function expression name, so there is no need to assign special flags. */
|
||||
if (context_p->lit_object.type != LEXER_LITERAL_OBJECT_ARGUMENTS)
|
||||
{
|
||||
uint8_t status_flags = LEXER_FLAG_VAR | LEXER_FLAG_INITIALIZED | LEXER_FLAG_FUNCTION_NAME;
|
||||
context_p->lit_object.literal_p->status_flags |= status_flags;
|
||||
uint8_t lexer_flags = LEXER_FLAG_VAR | LEXER_FLAG_INITIALIZED | LEXER_FLAG_FUNCTION_NAME;
|
||||
context_p->lit_object.literal_p->status_flags |= lexer_flags;
|
||||
}
|
||||
|
||||
if (context_p->token.literal_is_reserved
|
||||
@@ -2177,8 +2177,8 @@ parser_parse_function (parser_context_t *context_p, /**< context */
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t status_flags = LEXER_FLAG_VAR | LEXER_FLAG_INITIALIZED | LEXER_FLAG_FUNCTION_ARGUMENT;
|
||||
context_p->lit_object.literal_p->status_flags |= status_flags;
|
||||
uint8_t lexer_flags = LEXER_FLAG_VAR | LEXER_FLAG_INITIALIZED | LEXER_FLAG_FUNCTION_ARGUMENT;
|
||||
context_p->lit_object.literal_p->status_flags |= lexer_flags;
|
||||
}
|
||||
|
||||
context_p->argument_count++;
|
||||
@@ -2388,7 +2388,7 @@ parser_parse_script (const uint8_t *source_p, /**< source code */
|
||||
* situation. However, a simple value can still be thrown. */
|
||||
return ecma_make_error_value (ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL));
|
||||
}
|
||||
#if JERRY_ENABLE_ERROR_MESSAGES
|
||||
#ifdef JERRY_ENABLE_ERROR_MESSAGES
|
||||
const char *err_str_p = parser_error_to_string (parser_error.error);
|
||||
uint32_t err_str_size = lit_zt_utf8_string_size ((const lit_utf8_byte_t *) err_str_p);
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ re_parse_alternative (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context
|
||||
: RE_OP_CHAR_CLASS);
|
||||
uint32_t offset = re_get_bytecode_length (re_ctx_p->bytecode_ctx_p);
|
||||
|
||||
ECMA_TRY_CATCH (empty,
|
||||
ECMA_TRY_CATCH (empty_value,
|
||||
re_parse_char_class (re_ctx_p->parser_ctx_p,
|
||||
re_append_char_class,
|
||||
re_ctx_p,
|
||||
@@ -400,7 +400,7 @@ re_parse_alternative (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context
|
||||
re_insert_simple_iterator (re_ctx_p, new_atom_start_offset);
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (empty);
|
||||
ECMA_FINALIZE (empty_value);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ typedef struct
|
||||
ecma_value_t
|
||||
re_compile_bytecode (const re_compiled_code_t **out_bytecode_p, ecma_string_t *pattern_str_p, uint16_t flags);
|
||||
|
||||
void re_cache_gc_run ();
|
||||
void re_cache_gc_run (void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user