2222
2323#ifdef PARSER_DEBUG
2424 uint8_t bp_count = 0 ;
25- // debug_breakpoints bp_info;
2625#endif /* !PARSER_DEBUG */
26+
2727/** \addtogroup parser Parser
2828 * @{
2929 *
@@ -1267,9 +1267,9 @@ parser_post_processing (parser_context_t *context_p) /**< context */
12671267 jmem_cpointer_t * literal_pool_p ;
12681268 uint8_t * dst_p ;
12691269
1270- #ifdef PARSER_DEBUG
1271- debug_literal_map_t literal_map_p ;
1272- #endif /* PARSER_DEBUG */
1270+ // #ifdef PARSER_DEBUG
1271+ // debug_literal_map_t literal_map_p;
1272+ // #endif /* PARSER_DEBUG */
12731273
12741274 printf ("\n @@@@@@@@ parser post processing start @@@@@@@@@ \n" );
12751275
@@ -1305,18 +1305,18 @@ parser_post_processing (parser_context_t *context_p) /**< context */
13051305 page_p = context_p -> byte_code .first_p ;
13061306 offset = 0 ;
13071307
1308- #ifdef PARSER_DEBUG
1309- parser_list_iterator_t literal_iterator ;
1310- lexer_literal_t * literal_p ;
1311-
1312- parser_list_iterator_init (& context_p -> literal_pool , & literal_iterator );
1313- while ((literal_p = (lexer_literal_t * ) parser_list_iterator_next (& literal_iterator )))
1314- {
1315- if (literal_p -> type == LEXER_IDENT_LITERAL )
1316- {
1317- size_t size = literal_p -> prop .length ;
1318- literal_map_p .literal_len = (uint8_t ) size ; // debug_literal_map_t literal_map_p;
1319- literal_map_p .index = literal_p -> prop .index ;
1308+ // #ifdef PARSER_DEBUG
1309+ // parser_list_iterator_t literal_iterator;
1310+ // lexer_literal_t *literal_p;
1311+
1312+ // parser_list_iterator_init (&context_p->literal_pool, &literal_iterator);
1313+ // while ((literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator)))
1314+ // {
1315+ // if (literal_p->type == LEXER_IDENT_LITERAL)
1316+ // {
1317+ // size_t size = literal_p->prop.length;
1318+ // literal_map_p.literal_len = (uint8_t) size; // debug_literal_map_t literal_map_p;
1319+ // literal_map_p.index = literal_p->prop.index;
13201320 // PRINT THE LITERAL IN THE CBC_CODES TO CHECK IT << NOT FINAL
13211321 // const uint8_t *char_p = literal_p->u.char_p;
13221322 // printf("\n");
@@ -1327,11 +1327,11 @@ parser_post_processing (parser_context_t *context_p) /**< context */
13271327 // size--;
13281328 // }
13291329 // printf("\n");
1330- }
1331- literal_map_p .header .type = JERRY_DEBUG_MAP_INFO ;
1332- literal_map_p .header .size = (uint16_t ) (sizeof (debug_literal_map_t ) - 255 + literal_map_p .literal_len );
1333- }
1334- #endif /* !PARSER_DEBUG */
1330+ // }
1331+ // literal_map_p.header.type = JERRY_DEBUG_MAP_INFO;
1332+ // literal_map_p.header.size = (uint16_t) (sizeof (debug_literal_map_t) - 255 + literal_map_p.literal_len);
1333+ // }
1334+ // #endif /* !PARSER_DEBUG */
13351335
13361336 while (page_p != last_page_p || offset < last_position )
13371337 {
@@ -1596,10 +1596,11 @@ parser_post_processing (parser_context_t *context_p) /**< context */
15961596 printf ("<<< compressed bytecode: %d " , debug_func_bytecode_data_cp );
15971597 uint32_t rel_offset = (uint32_t )debug_func_bytecode_data_cp - (uint32_t )rel_offset_tmp ;
15981598 //context_p->line_info.pairs[bp_count].offset = rel_offset;
1599- printf ("<<< line_info.pairs[%d].offset: %p\n" , bp_count , rel_offset );
1600-
16011599 bp_info [bp_count ].line_offset = rel_offset ;
1600+
1601+ printf ("bp_info[%d].line_offset = %p\n " , bp_count , bp_info [bp_count ].line_offset );
16021602 bp_count ++ ;
1603+
16031604 }
16041605#endif /* !PARSER_DEBUG */
16051606
@@ -1740,13 +1741,15 @@ parser_post_processing (parser_context_t *context_p) /**< context */
17401741 context_p -> header_info .start_address_p = compiled_code_p ;
17411742 context_p -> header_info .name_len = 0 ;
17421743
1743- printf ("\n@@@@@@SEND THE BREAKPOINTS INFOS AFTER PARSING@@@@@@\n" );
1744- bp_info [bp_count ].type = BREAKPOINT_INFO ;
1745- int tmp ;
1746- for ( tmp = 0 ; tmp < bp_count ; tmp ++ ) {
1747- send (connection , & bp_info [bp_count ], sizeof (bp_info [bp_count ]), 0 );
1748- }
1749- bp_count = 0 ;
1744+ // printf("\n@@@@@@SEND THE BREAKPOINTS INFOS AFTER PARSING@@@@@@\n");
1745+ // bp_info[bp_count].type = BREAKPOINT_INFO;
1746+ // int tmp;
1747+
1748+ // for ( tmp = 0; tmp < bp_count; tmp ++) {
1749+ // send(sockfd_connection, &bp_info[bp_count], sizeof(bp_info[bp_count]), 0);
1750+ // }
1751+
1752+ // bp_count = 0;
17501753#endif /* PARSER_DEBUG */
17511754
17521755#ifdef PARSER_DUMP_BYTE_CODE
0 commit comments