Fix wrong indentations of function parameters

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2016-05-02 13:38:28 +02:00
parent 19b972b8eb
commit 7813801cd3
17 changed files with 61 additions and 61 deletions
+6 -6
View File
@@ -1167,7 +1167,7 @@ lexer_process_char_literal (parser_context_t *context_p, /**< context */
uint32_t literal_index = 0;
JERRY_ASSERT (literal_type == LEXER_IDENT_LITERAL
|| literal_type == LEXER_STRING_LITERAL);
|| literal_type == LEXER_STRING_LITERAL);
JERRY_ASSERT (literal_type != LEXER_IDENT_LITERAL || length <= PARSER_MAXIMUM_IDENT_LENGTH);
JERRY_ASSERT (literal_type != LEXER_STRING_LITERAL || length <= PARSER_MAXIMUM_STRING_LENGTH);
@@ -1232,7 +1232,7 @@ lexer_construct_literal_object (parser_context_t *context_p, /**< context */
uint8_t local_byte_array[LEXER_MAX_LITERAL_LOCAL_BUFFER_SIZE];
JERRY_ASSERT (literal_p->type == LEXER_IDENT_LITERAL
|| literal_p->type == LEXER_STRING_LITERAL);
|| literal_p->type == LEXER_STRING_LITERAL);
JERRY_ASSERT (context_p->allocated_buffer_p == NULL);
destination_start_p = local_byte_array;
@@ -1435,9 +1435,9 @@ lexer_construct_literal_object (parser_context_t *context_p, /**< context */
JERRY_ASSERT (character >= 0x10000);
character -= 0x10000;
destination_p += lit_char_to_utf8_bytes (destination_p,
(ecma_char_t) (0xd800 | (character >> 10)));
(ecma_char_t) (0xd800 | (character >> 10)));
destination_p += lit_char_to_utf8_bytes (destination_p,
(ecma_char_t) (0xdc00 | (character & LIT_UTF16_LAST_10_BITS_MASK)));
(ecma_char_t) (0xdc00 | (character & LIT_UTF16_LAST_10_BITS_MASK)));
source_p += 4;
continue;
}
@@ -1662,7 +1662,7 @@ lexer_construct_regexp_object (parser_context_t *context_p, /**< context */
lit_utf8_size_t length;
JERRY_ASSERT (context_p->token.type == LEXER_DIVIDE
|| context_p->token.type == LEXER_ASSIGN_DIVIDE);
|| context_p->token.type == LEXER_ASSIGN_DIVIDE);
if (context_p->token.type == LEXER_ASSIGN_DIVIDE)
{
@@ -1850,7 +1850,7 @@ lexer_expect_identifier (parser_context_t *context_p, /**< context */
uint8_t literal_type) /**< literal type */
{
JERRY_ASSERT (literal_type == LEXER_STRING_LITERAL
|| literal_type == LEXER_IDENT_LITERAL);
|| literal_type == LEXER_IDENT_LITERAL);
skip_spaces (context_p);
context_p->token.line = context_p->line;
+8 -8
View File
@@ -693,12 +693,12 @@ parser_process_unary_expression (parser_context_t *context_p) /**< context */
lexer_expect_identifier (context_p, LEXER_STRING_LITERAL);
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_STRING_LITERAL);
&& context_p->token.lit_location.type == LEXER_STRING_LITERAL);
if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)
{
JERRY_ASSERT (CBC_ARGS_EQ (CBC_PUSH_PROP_LITERAL_LITERAL,
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
context_p->last_cbc_opcode = CBC_PUSH_PROP_LITERAL_LITERAL;
context_p->last_cbc.value = context_p->lit_object.index;
}
@@ -1162,19 +1162,19 @@ parser_append_binary_token (parser_context_t *context_p) /**< context */
else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_LITERAL)
{
JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_LITERAL,
CBC_PUSH_PROP_LITERAL_REFERENCE));
CBC_PUSH_PROP_LITERAL_REFERENCE));
context_p->last_cbc_opcode = CBC_PUSH_PROP_LITERAL_REFERENCE;
}
else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_LITERAL_LITERAL)
{
JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_LITERAL_LITERAL,
CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE));
CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE));
context_p->last_cbc_opcode = CBC_PUSH_PROP_LITERAL_LITERAL_REFERENCE;
}
else if (context_p->last_cbc_opcode == CBC_PUSH_PROP_THIS_LITERAL)
{
JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP_THIS_LITERAL,
CBC_PUSH_PROP_THIS_LITERAL_REFERENCE));
CBC_PUSH_PROP_THIS_LITERAL_REFERENCE));
context_p->last_cbc_opcode = CBC_PUSH_PROP_THIS_LITERAL_REFERENCE;
}
else
@@ -1239,7 +1239,7 @@ parser_process_binary_opcodes (parser_context_t *context_p, /**< context */
if (opcode == CBC_ASSIGN_SET_IDENT)
{
JERRY_ASSERT (CBC_ARGS_EQ (CBC_ASSIGN_LITERAL_SET_IDENT,
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
context_p->last_cbc.value = parser_stack_pop_uint16 (context_p);
context_p->last_cbc_opcode = CBC_ASSIGN_LITERAL_SET_IDENT;
continue;
@@ -1274,7 +1274,7 @@ parser_process_binary_opcodes (parser_context_t *context_p, /**< context */
if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL)
{
JERRY_ASSERT (CBC_ARGS_EQ (opcode + CBC_BINARY_LVALUE_WITH_LITERAL,
CBC_HAS_LITERAL_ARG));
CBC_HAS_LITERAL_ARG));
context_p->last_cbc_opcode = (uint16_t) (opcode + CBC_BINARY_LVALUE_WITH_LITERAL);
continue;
}
@@ -1299,7 +1299,7 @@ parser_process_binary_opcodes (parser_context_t *context_p, /**< context */
else if (context_p->last_cbc_opcode == CBC_PUSH_TWO_LITERALS)
{
JERRY_ASSERT (CBC_ARGS_EQ (opcode + CBC_BINARY_WITH_TWO_LITERALS,
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
CBC_HAS_LITERAL_ARG | CBC_HAS_LITERAL_ARG2));
context_p->last_cbc_opcode = (uint16_t) (opcode + CBC_BINARY_WITH_TWO_LITERALS);
continue;
}
+5 -5
View File
@@ -263,7 +263,7 @@ parser_list_get (parser_list_t *list_p, /**< parser list */
JERRY_ASSERT (page_p != NULL);
JERRY_ASSERT (page_p != list_p->data.last_p
|| (index * list_p->item_size < list_p->data.last_position));
|| (index * list_p->item_size < list_p->data.last_position));
return page_p->bytes + (index * list_p->item_size);
} /* parser_list_get */
@@ -358,7 +358,7 @@ parser_stack_push_uint8 (parser_context_t *context_p, /**< context */
* parser_stack_push() pushes not fully initialized structures.
* More precisely when the last byte of the structure is uninitialized. */
JERRY_ASSERT (page_p == NULL
|| context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
|| context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
if (context_p->stack.last_position >= PARSER_STACK_PAGE_SIZE)
{
@@ -391,7 +391,7 @@ parser_stack_pop_uint8 (parser_context_t *context_p) /**< context */
parser_mem_page_t *page_p = context_p->stack.first_p;
JERRY_ASSERT (page_p != NULL
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
context_p->stack.last_position--;
@@ -430,7 +430,7 @@ parser_stack_push_uint16 (parser_context_t *context_p, /**< context */
parser_mem_page_t *page_p = context_p->stack.first_p;
JERRY_ASSERT (page_p != NULL
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
page_p->bytes[context_p->stack.last_position++] = (uint8_t) (uint16_value >> 8);
page_p->bytes[context_p->stack.last_position++] = (uint8_t) uint16_value;
@@ -458,7 +458,7 @@ parser_stack_pop_uint16 (parser_context_t *context_p) /**< context */
parser_mem_page_t *page_p = context_p->stack.first_p;
JERRY_ASSERT (page_p != NULL
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
value |= ((uint32_t) page_p->bytes[context_p->stack.last_position - 2]) << 8;
context_p->stack_top_uint8 = page_p->bytes[context_p->stack.last_position - 3];
+2 -2
View File
@@ -586,8 +586,8 @@ parser_scan_until (parser_context_t *context_p, /**< context */
case SCAN_MODE_FUNCTION_ARGUMENTS:
{
JERRY_ASSERT (stack_top == SCAN_STACK_BLOCK_STATEMENT
|| stack_top == SCAN_STACK_BLOCK_EXPRESSION
|| stack_top == SCAN_STACK_BLOCK_PROPERTY);
|| stack_top == SCAN_STACK_BLOCK_EXPRESSION
|| stack_top == SCAN_STACK_BLOCK_PROPERTY);
if (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL)
+9 -9
View File
@@ -266,7 +266,7 @@ parser_stack_change_last_uint8 (parser_context_t *context_p, /**< context */
parser_mem_page_t *page_p = context_p->stack.first_p;
JERRY_ASSERT (page_p != NULL
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
&& context_p->stack_top_uint8 == page_p->bytes[context_p->stack.last_position - 1]);
page_p->bytes[context_p->stack.last_position - 1] = new_value;
context_p->stack_top_uint8 = new_value;
@@ -307,7 +307,7 @@ parser_parse_var_statement (parser_context_t *context_p) /**< context */
{
lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_VAR;
@@ -323,7 +323,7 @@ parser_parse_var_statement (parser_context_t *context_p) /**< context */
else
{
JERRY_ASSERT (context_p->last_cbc_opcode == CBC_PUSH_LITERAL
&& context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL);
&& context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL);
/* We don't need to assign anything to this variable. */
context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;
}
@@ -350,7 +350,7 @@ parser_parse_function_statement (parser_context_t *context_p) /**< context */
lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
if (context_p->lit_object.type == LEXER_LITERAL_OBJECT_ARGUMENTS)
{
@@ -364,7 +364,7 @@ parser_parse_function_statement (parser_context_t *context_p) /**< context */
if (context_p->lit_object.type != LEXER_LITERAL_OBJECT_ANY)
{
JERRY_ASSERT (context_p->lit_object.type == LEXER_LITERAL_OBJECT_EVAL
|| context_p->lit_object.type == LEXER_LITERAL_OBJECT_ARGUMENTS);
|| context_p->lit_object.type == LEXER_LITERAL_OBJECT_ARGUMENTS);
status_flags |= PARSER_HAS_NON_STRICT_ARG;
}
@@ -378,7 +378,7 @@ parser_parse_function_statement (parser_context_t *context_p) /**< context */
literal_p = PARSER_GET_LITERAL ((size_t) (context_p->lit_object.index + 1));
JERRY_ASSERT (literal_p->type == LEXER_FUNCTION_LITERAL
&& literal_p->status_flags == 0);
&& literal_p->status_flags == 0);
compiled_code_p = parser_parse_function (context_p, status_flags);
util_free_literal (literal_p);
@@ -741,7 +741,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_VAR;
@@ -774,7 +774,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
/* The CBC_EXT_FOR_IN_CREATE_CONTEXT flushed the opcode combiner. */
JERRY_ASSERT (opcode != CBC_PUSH_TWO_LITERALS
&& opcode != CBC_PUSH_THREE_LITERALS);
&& opcode != CBC_PUSH_THREE_LITERALS);
if (opcode == CBC_PUSH_LITERAL
&& context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)
@@ -1176,7 +1176,7 @@ parser_parse_try_statement_end (parser_context_t *context_p) /**< context */
lexer_expect_identifier (context_p, LEXER_IDENT_LITERAL);
JERRY_ASSERT (context_p->token.type == LEXER_LITERAL
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
&& context_p->token.lit_location.type == LEXER_IDENT_LITERAL);
context_p->lit_object.literal_p->status_flags |= LEXER_FLAG_NO_REG_STORE;
context_p->status_flags |= PARSER_LEXICAL_ENV_NEEDED;
+9 -9
View File
@@ -267,7 +267,7 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
{
JERRY_ASSERT (literal_p->status_flags == 0);
JERRY_ASSERT (literal_p->type == LEXER_FUNCTION_LITERAL
|| literal_p->type == LEXER_REGEXP_LITERAL);
|| literal_p->type == LEXER_REGEXP_LITERAL);
literal_p->prop.index = literal_index;
literal_index++;
@@ -346,7 +346,7 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);
JERRY_ASSERT (literal_p != NULL
&& literal_p->type == LEXER_FUNCTION_LITERAL);
&& literal_p->type == LEXER_FUNCTION_LITERAL);
literal_p->prop.index = init_index;
}
}
@@ -496,7 +496,7 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);
JERRY_ASSERT (literal_p != NULL
&& literal_p->type == LEXER_FUNCTION_LITERAL);
&& literal_p->type == LEXER_FUNCTION_LITERAL);
init_index = literal_p->prop.index;
}
@@ -578,7 +578,7 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);
JERRY_ASSERT (literal_p != NULL
&& literal_p->type == LEXER_FUNCTION_LITERAL);
&& literal_p->type == LEXER_FUNCTION_LITERAL);
init_index = literal_p->prop.index;
ECMA_SET_NON_NULL_POINTER (literal_pool_p[literal_p->prop.index],
literal_p->u.bytecode_p);
@@ -1755,7 +1755,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
}
JERRY_ASSERT (literal_p->type == LEXER_IDENT_LITERAL
&& (literal_p->status_flags & LEXER_FLAG_VAR));
&& (literal_p->status_flags & LEXER_FLAG_VAR));
JERRY_ASSERT (argument_count < literal_p->prop.index);
@@ -1876,10 +1876,10 @@ parser_parse_source (const uint8_t *source_p, /**< valid UTF-8 source code */
/* When the parsing is successful, only the
* dummy value can be remained on the stack. */
JERRY_ASSERT (context.stack_top_uint8 == CBC_MAXIMUM_BYTE_VALUE
&& context.stack.last_position == 1
&& context.stack.first_p != NULL
&& context.stack.first_p->next_p == NULL
&& context.stack.last_p == NULL);
&& context.stack.last_position == 1
&& context.stack.first_p != NULL
&& context.stack.first_p->next_p == NULL
&& context.stack.last_p == NULL);
JERRY_ASSERT (context.last_statement.current_p == NULL);
JERRY_ASSERT (context.last_cbc_opcode == PARSER_CBC_UNAVAILABLE);