@@ -171,7 +171,7 @@ typedef struct
171171 *
172172 * @return size consumed by a statement.
173173 */
174- static PARSER_INLINE size_t
174+ static inline size_t
175175parser_statement_length (uint8_t type ) /**< type of statement */
176176{
177177 static const uint8_t statement_lengths [12 ] =
@@ -211,7 +211,7 @@ parser_statement_length (uint8_t type) /**< type of statement */
211211/**
212212 * Initialize a range from the current location.
213213 */
214- static PARSER_INLINE void
214+ static inline void
215215parser_save_range (parser_context_t * context_p , /**< context */
216216 lexer_range_t * range_p , /**< destination range */
217217 const uint8_t * source_end_p ) /**< source end */
@@ -225,7 +225,7 @@ parser_save_range (parser_context_t *context_p, /**< context */
225225/**
226226 * Set the current location on the stack.
227227 */
228- static PARSER_INLINE void
228+ static inline void
229229parser_set_range (parser_context_t * context_p , /**< context */
230230 lexer_range_t * range_p ) /**< destination range */
231231{
@@ -238,7 +238,7 @@ parser_set_range (parser_context_t *context_p, /**< context */
238238/**
239239 * Initialize stack iterator.
240240 */
241- static PARSER_INLINE void
241+ static inline void
242242parser_stack_iterator_init (parser_context_t * context_p , /**< context */
243243 parser_stack_iterator_t * iterator ) /**< iterator */
244244{
@@ -249,7 +249,7 @@ parser_stack_iterator_init (parser_context_t *context_p, /**< context */
249249/**
250250 * Read the next byte from the stack.
251251 */
252- static PARSER_INLINE uint8_t
252+ static inline uint8_t
253253parser_stack_iterator_read_uint8 (parser_stack_iterator_t * iterator ) /**< iterator */
254254{
255255 JERRY_ASSERT (iterator -> current_position > 0 && iterator -> current_position <= PARSER_STACK_PAGE_SIZE );
@@ -259,7 +259,7 @@ parser_stack_iterator_read_uint8 (parser_stack_iterator_t *iterator) /**< iterat
259259/**
260260 * Change last byte of the stack.
261261 */
262- static PARSER_INLINE void
262+ static inline void
263263parser_stack_change_last_uint8 (parser_context_t * context_p , /**< context */
264264 uint8_t new_value ) /**< new value */
265265{
@@ -275,7 +275,7 @@ parser_stack_change_last_uint8 (parser_context_t *context_p, /**< context */
275275/**
276276 * Parse expression enclosed in parens.
277277 */
278- static PARSER_INLINE void
278+ static inline void
279279parser_parse_enclosed_expr (parser_context_t * context_p ) /**< context */
280280{
281281 lexer_next_token (context_p );
@@ -494,9 +494,9 @@ parser_parse_with_statement_start (parser_context_t *context_p) /**< context */
494494
495495 parser_parse_enclosed_expr (context_p );
496496
497- #ifdef PARSER_DEBUG
497+ #ifndef JERRY_NDEBUG
498498 PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
499- #endif /* PARSER_DEBUG */
499+ #endif /* !JERRY_NDEBUG */
500500
501501 context_p -> status_flags |= PARSER_INSIDE_WITH | PARSER_LEXICAL_ENV_NEEDED ;
502502 parser_emit_cbc_ext_forward_branch (context_p ,
@@ -525,9 +525,9 @@ parser_parse_with_statement_end (parser_context_t *context_p) /**< context */
525525
526526 parser_flush_cbc (context_p );
527527 PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
528- #ifdef PARSER_DEBUG
528+ #ifndef JERRY_NDEBUG
529529 PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
530- #endif /* PARSER_DEBUG */
530+ #endif /* !JERRY_NDEBUG */
531531
532532 parser_emit_cbc (context_p , CBC_CONTEXT_END );
533533 parser_set_branch_to_current_position (context_p , & with_statement .branch );
@@ -638,7 +638,7 @@ parser_parse_while_statement_start (parser_context_t *context_p) /**< context */
638638/**
639639 * Parse while statement (ending part).
640640 */
641- static void PARSER_NOINLINE
641+ static void __attr_noinline___
642642parser_parse_while_statement_end (parser_context_t * context_p ) /**< context */
643643{
644644 parser_while_statement_t while_statement ;
@@ -720,9 +720,9 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
720720 parser_raise_error (context_p , PARSER_ERR_RIGHT_PAREN_EXPECTED );
721721 }
722722
723- #ifdef PARSER_DEBUG
723+ #ifndef JERRY_NDEBUG
724724 PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
725- #endif /* PARSER_DEBUG */
725+ #endif /* !JERRY_NDEBUG */
726726
727727 parser_emit_cbc_ext_forward_branch (context_p ,
728728 CBC_EXT_FOR_IN_CREATE_CONTEXT ,
@@ -878,7 +878,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
878878/**
879879 * Parse for statement (ending part).
880880 */
881- static void PARSER_NOINLINE
881+ static void __attr_noinline___
882882parser_parse_for_statement_end (parser_context_t * context_p ) /**< context */
883883{
884884 parser_for_statement_t for_statement ;
@@ -953,7 +953,7 @@ parser_parse_for_statement_end (parser_context_t *context_p) /**< context */
953953/**
954954 * Parse switch statement (starting part).
955955 */
956- static void PARSER_NOINLINE
956+ static void __attr_noinline___
957957parser_parse_switch_statement_start (parser_context_t * context_p ) /**< context */
958958{
959959 parser_switch_statement_t switch_statement ;
@@ -1120,9 +1120,9 @@ parser_parse_try_statement_end (parser_context_t *context_p) /**< context */
11201120 {
11211121 parser_flush_cbc (context_p );
11221122 PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1123- #ifdef PARSER_DEBUG
1123+ #ifndef JERRY_NDEBUG
11241124 PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1125- #endif /* PARSER_DEBUG */
1125+ #endif /* !JERRY_NDEBUG */
11261126
11271127 parser_emit_cbc (context_p , CBC_CONTEXT_END );
11281128 parser_set_branch_to_current_position (context_p , & try_statement .branch );
@@ -1137,9 +1137,9 @@ parser_parse_try_statement_end (parser_context_t *context_p) /**< context */
11371137 {
11381138 parser_flush_cbc (context_p );
11391139 PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1140- #ifdef PARSER_DEBUG
1140+ #ifndef JERRY_NDEBUG
11411141 PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1142- #endif /* PARSER_DEBUG */
1142+ #endif /* !JERRY_NDEBUG */
11431143
11441144 parser_emit_cbc (context_p , CBC_CONTEXT_END );
11451145 parser_flush_cbc (context_p );
@@ -1641,9 +1641,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
16411641 while (context_p -> token .type != LEXER_EOS
16421642 || context_p -> stack_top_uint8 != PARSER_STATEMENT_START )
16431643 {
1644- #ifdef PARSER_DEBUG
1644+ #ifndef JERRY_NDEBUG
16451645 JERRY_ASSERT (context_p -> stack_depth == context_p -> context_stack_depth );
1646- #endif /* PARSER_DEBUG */
1646+ #endif /* !JERRY_NDEBUG */
16471647
16481648 switch (context_p -> token .type )
16491649 {
@@ -1747,9 +1747,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
17471747 parser_raise_error (context_p , PARSER_ERR_LEFT_BRACE_EXPECTED );
17481748 }
17491749
1750- #ifdef PARSER_DEBUG
1750+ #ifndef JERRY_NDEBUG
17511751 PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1752- #endif /* PARSER_DEBUG */
1752+ #endif /* !JERRY_NDEBUG */
17531753
17541754 try_statement .type = parser_try_block ;
17551755 parser_emit_cbc_ext_forward_branch (context_p ,
@@ -1922,9 +1922,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
19221922 parser_stack_pop_uint8 (context_p );
19231923 context_p -> last_statement .current_p = NULL ;
19241924 JERRY_ASSERT (context_p -> stack_depth == 0 );
1925- #ifdef PARSER_DEBUG
1925+ #ifndef JERRY_NDEBUG
19261926 JERRY_ASSERT (context_p -> context_stack_depth == 0 );
1927- #endif /* PARSER_DEBUG */
1927+ #endif /* !JERRY_NDEBUG */
19281928 /* There is no lexer_next_token here, since the
19291929 * next token belongs to the parent context. */
19301930 return ;
@@ -2015,9 +2015,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
20152015
20162016 parser_flush_cbc (context_p );
20172017 PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
2018- #ifdef PARSER_DEBUG
2018+ #ifndef JERRY_NDEBUG
20192019 PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
2020- #endif /* PARSER_DEBUG */
2020+ #endif /* !JERRY_NDEBUG */
20212021
20222022 parser_emit_cbc_ext_backward_branch (context_p ,
20232023 CBC_EXT_BRANCH_IF_FOR_IN_HAS_NEXT ,
@@ -2044,9 +2044,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
20442044 }
20452045
20462046 JERRY_ASSERT (context_p -> stack_depth == 0 );
2047- #ifdef PARSER_DEBUG
2047+ #ifndef JERRY_NDEBUG
20482048 JERRY_ASSERT (context_p -> context_stack_depth == 0 );
2049- #endif /* PARSER_DEBUG */
2049+ #endif /* !JERRY_NDEBUG */
20502050
20512051 parser_stack_pop_uint8 (context_p );
20522052 context_p -> last_statement .current_p = NULL ;
@@ -2060,7 +2060,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
20602060/**
20612061 * Free jumps stored on the stack if a parse error is occured.
20622062 */
2063- void PARSER_NOINLINE
2063+ void __attr_noinline___
20642064parser_free_jumps (parser_stack_iterator_t iterator ) /**< iterator position */
20652065{
20662066 while (PARSER_TRUE )
0 commit comments