@@ -171,7 +171,7 @@ typedef struct
171
171
*
172
172
* @return size consumed by a statement.
173
173
*/
174
- static PARSER_INLINE size_t
174
+ static inline size_t
175
175
parser_statement_length (uint8_t type ) /**< type of statement */
176
176
{
177
177
static const uint8_t statement_lengths [12 ] =
@@ -211,7 +211,7 @@ parser_statement_length (uint8_t type) /**< type of statement */
211
211
/**
212
212
* Initialize a range from the current location.
213
213
*/
214
- static PARSER_INLINE void
214
+ static inline void
215
215
parser_save_range (parser_context_t * context_p , /**< context */
216
216
lexer_range_t * range_p , /**< destination range */
217
217
const uint8_t * source_end_p ) /**< source end */
@@ -225,7 +225,7 @@ parser_save_range (parser_context_t *context_p, /**< context */
225
225
/**
226
226
* Set the current location on the stack.
227
227
*/
228
- static PARSER_INLINE void
228
+ static inline void
229
229
parser_set_range (parser_context_t * context_p , /**< context */
230
230
lexer_range_t * range_p ) /**< destination range */
231
231
{
@@ -238,7 +238,7 @@ parser_set_range (parser_context_t *context_p, /**< context */
238
238
/**
239
239
* Initialize stack iterator.
240
240
*/
241
- static PARSER_INLINE void
241
+ static inline void
242
242
parser_stack_iterator_init (parser_context_t * context_p , /**< context */
243
243
parser_stack_iterator_t * iterator ) /**< iterator */
244
244
{
@@ -249,7 +249,7 @@ parser_stack_iterator_init (parser_context_t *context_p, /**< context */
249
249
/**
250
250
* Read the next byte from the stack.
251
251
*/
252
- static PARSER_INLINE uint8_t
252
+ static inline uint8_t
253
253
parser_stack_iterator_read_uint8 (parser_stack_iterator_t * iterator ) /**< iterator */
254
254
{
255
255
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
259
259
/**
260
260
* Change last byte of the stack.
261
261
*/
262
- static PARSER_INLINE void
262
+ static inline void
263
263
parser_stack_change_last_uint8 (parser_context_t * context_p , /**< context */
264
264
uint8_t new_value ) /**< new value */
265
265
{
@@ -275,7 +275,7 @@ parser_stack_change_last_uint8 (parser_context_t *context_p, /**< context */
275
275
/**
276
276
* Parse expression enclosed in parens.
277
277
*/
278
- static PARSER_INLINE void
278
+ static inline void
279
279
parser_parse_enclosed_expr (parser_context_t * context_p ) /**< context */
280
280
{
281
281
lexer_next_token (context_p );
@@ -494,9 +494,9 @@ parser_parse_with_statement_start (parser_context_t *context_p) /**< context */
494
494
495
495
parser_parse_enclosed_expr (context_p );
496
496
497
- #ifdef PARSER_DEBUG
497
+ #ifndef JERRY_NDEBUG
498
498
PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
499
- #endif /* PARSER_DEBUG */
499
+ #endif /* !JERRY_NDEBUG */
500
500
501
501
context_p -> status_flags |= PARSER_INSIDE_WITH | PARSER_LEXICAL_ENV_NEEDED ;
502
502
parser_emit_cbc_ext_forward_branch (context_p ,
@@ -525,9 +525,9 @@ parser_parse_with_statement_end (parser_context_t *context_p) /**< context */
525
525
526
526
parser_flush_cbc (context_p );
527
527
PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
528
- #ifdef PARSER_DEBUG
528
+ #ifndef JERRY_NDEBUG
529
529
PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_WITH_CONTEXT_STACK_ALLOCATION );
530
- #endif /* PARSER_DEBUG */
530
+ #endif /* !JERRY_NDEBUG */
531
531
532
532
parser_emit_cbc (context_p , CBC_CONTEXT_END );
533
533
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 */
638
638
/**
639
639
* Parse while statement (ending part).
640
640
*/
641
- static void PARSER_NOINLINE
641
+ static void __attr_noinline___
642
642
parser_parse_while_statement_end (parser_context_t * context_p ) /**< context */
643
643
{
644
644
parser_while_statement_t while_statement ;
@@ -720,9 +720,9 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
720
720
parser_raise_error (context_p , PARSER_ERR_RIGHT_PAREN_EXPECTED );
721
721
}
722
722
723
- #ifdef PARSER_DEBUG
723
+ #ifndef JERRY_NDEBUG
724
724
PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
725
- #endif /* PARSER_DEBUG */
725
+ #endif /* !JERRY_NDEBUG */
726
726
727
727
parser_emit_cbc_ext_forward_branch (context_p ,
728
728
CBC_EXT_FOR_IN_CREATE_CONTEXT ,
@@ -878,7 +878,7 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
878
878
/**
879
879
* Parse for statement (ending part).
880
880
*/
881
- static void PARSER_NOINLINE
881
+ static void __attr_noinline___
882
882
parser_parse_for_statement_end (parser_context_t * context_p ) /**< context */
883
883
{
884
884
parser_for_statement_t for_statement ;
@@ -953,7 +953,7 @@ parser_parse_for_statement_end (parser_context_t *context_p) /**< context */
953
953
/**
954
954
* Parse switch statement (starting part).
955
955
*/
956
- static void PARSER_NOINLINE
956
+ static void __attr_noinline___
957
957
parser_parse_switch_statement_start (parser_context_t * context_p ) /**< context */
958
958
{
959
959
parser_switch_statement_t switch_statement ;
@@ -1120,9 +1120,9 @@ parser_parse_try_statement_end (parser_context_t *context_p) /**< context */
1120
1120
{
1121
1121
parser_flush_cbc (context_p );
1122
1122
PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1123
- #ifdef PARSER_DEBUG
1123
+ #ifndef JERRY_NDEBUG
1124
1124
PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1125
- #endif /* PARSER_DEBUG */
1125
+ #endif /* !JERRY_NDEBUG */
1126
1126
1127
1127
parser_emit_cbc (context_p , CBC_CONTEXT_END );
1128
1128
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 */
1137
1137
{
1138
1138
parser_flush_cbc (context_p );
1139
1139
PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1140
- #ifdef PARSER_DEBUG
1140
+ #ifndef JERRY_NDEBUG
1141
1141
PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1142
- #endif /* PARSER_DEBUG */
1142
+ #endif /* !JERRY_NDEBUG */
1143
1143
1144
1144
parser_emit_cbc (context_p , CBC_CONTEXT_END );
1145
1145
parser_flush_cbc (context_p );
@@ -1641,9 +1641,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
1641
1641
while (context_p -> token .type != LEXER_EOS
1642
1642
|| context_p -> stack_top_uint8 != PARSER_STATEMENT_START )
1643
1643
{
1644
- #ifdef PARSER_DEBUG
1644
+ #ifndef JERRY_NDEBUG
1645
1645
JERRY_ASSERT (context_p -> stack_depth == context_p -> context_stack_depth );
1646
- #endif /* PARSER_DEBUG */
1646
+ #endif /* !JERRY_NDEBUG */
1647
1647
1648
1648
switch (context_p -> token .type )
1649
1649
{
@@ -1747,9 +1747,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
1747
1747
parser_raise_error (context_p , PARSER_ERR_LEFT_BRACE_EXPECTED );
1748
1748
}
1749
1749
1750
- #ifdef PARSER_DEBUG
1750
+ #ifndef JERRY_NDEBUG
1751
1751
PARSER_PLUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_TRY_CONTEXT_STACK_ALLOCATION );
1752
- #endif /* PARSER_DEBUG */
1752
+ #endif /* !JERRY_NDEBUG */
1753
1753
1754
1754
try_statement .type = parser_try_block ;
1755
1755
parser_emit_cbc_ext_forward_branch (context_p ,
@@ -1922,9 +1922,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
1922
1922
parser_stack_pop_uint8 (context_p );
1923
1923
context_p -> last_statement .current_p = NULL ;
1924
1924
JERRY_ASSERT (context_p -> stack_depth == 0 );
1925
- #ifdef PARSER_DEBUG
1925
+ #ifndef JERRY_NDEBUG
1926
1926
JERRY_ASSERT (context_p -> context_stack_depth == 0 );
1927
- #endif /* PARSER_DEBUG */
1927
+ #endif /* !JERRY_NDEBUG */
1928
1928
/* There is no lexer_next_token here, since the
1929
1929
* next token belongs to the parent context. */
1930
1930
return ;
@@ -2015,9 +2015,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2015
2015
2016
2016
parser_flush_cbc (context_p );
2017
2017
PARSER_MINUS_EQUAL_U16 (context_p -> stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
2018
- #ifdef PARSER_DEBUG
2018
+ #ifndef JERRY_NDEBUG
2019
2019
PARSER_MINUS_EQUAL_U16 (context_p -> context_stack_depth , PARSER_FOR_IN_CONTEXT_STACK_ALLOCATION );
2020
- #endif /* PARSER_DEBUG */
2020
+ #endif /* !JERRY_NDEBUG */
2021
2021
2022
2022
parser_emit_cbc_ext_backward_branch (context_p ,
2023
2023
CBC_EXT_BRANCH_IF_FOR_IN_HAS_NEXT ,
@@ -2044,9 +2044,9 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2044
2044
}
2045
2045
2046
2046
JERRY_ASSERT (context_p -> stack_depth == 0 );
2047
- #ifdef PARSER_DEBUG
2047
+ #ifndef JERRY_NDEBUG
2048
2048
JERRY_ASSERT (context_p -> context_stack_depth == 0 );
2049
- #endif /* PARSER_DEBUG */
2049
+ #endif /* !JERRY_NDEBUG */
2050
2050
2051
2051
parser_stack_pop_uint8 (context_p );
2052
2052
context_p -> last_statement .current_p = NULL ;
@@ -2060,7 +2060,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2060
2060
/**
2061
2061
* Free jumps stored on the stack if a parse error is occured.
2062
2062
*/
2063
- void PARSER_NOINLINE
2063
+ void __attr_noinline___
2064
2064
parser_free_jumps (parser_stack_iterator_t iterator ) /**< iterator position */
2065
2065
{
2066
2066
while (PARSER_TRUE )
0 commit comments