@@ -232,17 +232,6 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
232232
233233 if (literal_p -> status_flags & LEXER_FLAG_INITIALIZED )
234234 {
235- if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_NAME )
236- {
237- JERRY_ASSERT (literal_p == PARSER_GET_LITERAL (0 ));
238-
239- status_flags |= PARSER_NAMED_FUNCTION_EXP ;
240- context_p -> status_flags = status_flags ;
241-
242- literal_p -> status_flags |= LEXER_FLAG_NO_REG_STORE ;
243- context_p -> literal_count ++ ;
244- }
245-
246235 if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_ARGUMENT )
247236 {
248237 if ((status_flags & PARSER_ARGUMENTS_NEEDED )
@@ -460,14 +449,11 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
460449 init_index = literal_index ;
461450 literal_index ++ ;
462451
463- if (!(literal_p -> status_flags & LEXER_FLAG_FUNCTION_NAME ))
464- {
465- lexer_literal_t * func_literal_p = (lexer_literal_t * ) parser_list_iterator_next (& literal_iterator );
452+ lexer_literal_t * func_literal_p = (lexer_literal_t * ) parser_list_iterator_next (& literal_iterator );
466453
467- JERRY_ASSERT (func_literal_p != NULL
468- && func_literal_p -> type == LEXER_FUNCTION_LITERAL );
469- func_literal_p -> prop .index = init_index ;
470- }
454+ JERRY_ASSERT (func_literal_p != NULL
455+ && func_literal_p -> type == LEXER_FUNCTION_LITERAL );
456+ func_literal_p -> prop .index = init_index ;
471457 }
472458
473459 /* A CBC_INITIALIZE_VAR instruction or part of a CBC_INITIALIZE_VARS instruction. */
@@ -547,7 +533,6 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
547533 ecma_value_t * literal_pool_p , /**< start of literal pool */
548534 uint16_t uninitialized_var_end , /**< end of the uninitialized var group */
549535 uint16_t initialized_var_end , /**< end of the initialized var group */
550- uint16_t const_literal_end , /**< end of the const literal group */
551536 uint16_t literal_one_byte_limit ) /**< maximum value of a literal
552537 * encoded in one byte */
553538{
@@ -599,12 +584,7 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
599584#endif /* !JERRY_NDEBUG */
600585 literal_p -> status_flags = (uint8_t ) (literal_p -> status_flags & ~LEXER_FLAG_INITIALIZED );
601586
602-
603- if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_NAME )
604- {
605- init_index = const_literal_end ;
606- }
607- else if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_ARGUMENT )
587+ if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_ARGUMENT )
608588 {
609589 init_index = (uint16_t ) (argument_count - 1 );
610590 }
@@ -691,11 +671,7 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
691671
692672 JERRY_ASSERT (literal_p -> type == LEXER_IDENT_LITERAL );
693673
694- if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_NAME )
695- {
696- init_index = const_literal_end ;
697- }
698- else if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_ARGUMENT )
674+ if (literal_p -> status_flags & LEXER_FLAG_FUNCTION_ARGUMENT )
699675 {
700676 init_index = (uint16_t ) (argument_count - 1 );
701677
@@ -1840,7 +1816,6 @@ parser_post_processing (parser_context_t *context_p) /**< context */
18401816 literal_pool_p ,
18411817 uninitialized_var_end ,
18421818 initialized_var_end ,
1843- const_literal_end ,
18441819 literal_one_byte_limit );
18451820
18461821 JERRY_ASSERT (dst_p == byte_code_p + initializers_length );
@@ -2133,12 +2108,6 @@ parser_post_processing (parser_context_t *context_p) /**< context */
21332108 }
21342109#endif /* JERRY_ENABLE_LINE_INFO */
21352110
2136- if (context_p -> status_flags & PARSER_NAMED_FUNCTION_EXP )
2137- {
2138- ECMA_SET_INTERNAL_VALUE_POINTER (literal_pool_p [const_literal_end ],
2139- compiled_code_p );
2140- }
2141-
21422111#ifdef JERRY_DEBUGGER
21432112 if (JERRY_CONTEXT (debugger_flags ) & JERRY_DEBUGGER_CONNECTED )
21442113 {
@@ -2612,58 +2581,18 @@ parser_parse_function (parser_context_t *context_p, /**< context */
26122581 }
26132582#endif /* PARSER_DUMP_BYTE_CODE */
26142583
2615- #ifdef JERRY_DEBUGGER
2616- parser_line_counter_t debugger_line = context_p -> token .line ;
2617- parser_line_counter_t debugger_column = context_p -> token .column ;
2618- #endif /* JERRY_DEBUGGER */
2619-
2620- lexer_next_token (context_p );
2621-
2622- if (context_p -> status_flags & PARSER_IS_FUNC_EXPRESSION
2623- && context_p -> token .type == LEXER_LITERAL
2624- && context_p -> token .lit_location .type == LEXER_IDENT_LITERAL )
2625- {
2626- lexer_construct_literal_object (context_p ,
2627- & context_p -> token .lit_location ,
2628- LEXER_IDENT_LITERAL );
2629-
2630- #ifdef JERRY_DEBUGGER
2631- if (JERRY_CONTEXT (debugger_flags ) & JERRY_DEBUGGER_CONNECTED )
2632- {
2633- jerry_debugger_send_string (JERRY_DEBUGGER_FUNCTION_NAME ,
2634- JERRY_DEBUGGER_NO_SUBTYPE ,
2635- context_p -> lit_object .literal_p -> u .char_p ,
2636- context_p -> lit_object .literal_p -> prop .length );
2637- }
2638- #endif /* JERRY_DEBUGGER */
2639-
2640- /* The arguments object is created later than the binding to the
2641- * function expression name, so there is no need to assign special flags. */
2642- if (context_p -> lit_object .type != LEXER_LITERAL_OBJECT_ARGUMENTS )
2643- {
2644- uint8_t lexer_flags = LEXER_FLAG_VAR | LEXER_FLAG_INITIALIZED | LEXER_FLAG_FUNCTION_NAME ;
2645- context_p -> lit_object .literal_p -> status_flags |= lexer_flags ;
2646- }
2647-
2648- if (context_p -> token .literal_is_reserved
2649- || context_p -> lit_object .type != LEXER_LITERAL_OBJECT_ANY )
2650- {
2651- context_p -> status_flags |= PARSER_HAS_NON_STRICT_ARG ;
2652- }
2653-
2654- lexer_next_token (context_p );
2655- }
2656-
26572584#ifdef JERRY_DEBUGGER
26582585 if ((JERRY_CONTEXT (debugger_flags ) & JERRY_DEBUGGER_CONNECTED )
2659- && jerry_debugger_send_parse_function (debugger_line , debugger_column ))
2586+ && jerry_debugger_send_parse_function (context_p -> token . line , context_p -> token . column ))
26602587 {
26612588 /* This option has a high memory and performance costs,
26622589 * but it is necessary for executing eval operations by the debugger. */
26632590 context_p -> status_flags |= PARSER_LEXICAL_ENV_NEEDED | PARSER_NO_REG_STORE ;
26642591 }
26652592#endif /* JERRY_DEBUGGER */
26662593
2594+ lexer_next_token (context_p );
2595+
26672596 if (context_p -> token .type != LEXER_LEFT_PAREN )
26682597 {
26692598 parser_raise_error (context_p , PARSER_ERR_ARGUMENT_LIST_EXPECTED );
0 commit comments