22
22
23
23
#ifdef PARSER_DEBUG
24
24
uint8_t bp_count = 0 ;
25
- // debug_breakpoints bp_info;
26
25
#endif /* !PARSER_DEBUG */
26
+
27
27
/** \addtogroup parser Parser
28
28
* @{
29
29
*
@@ -1267,9 +1267,9 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1267
1267
jmem_cpointer_t * literal_pool_p ;
1268
1268
uint8_t * dst_p ;
1269
1269
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 */
1273
1273
1274
1274
printf ("\n @@@@@@@@ parser post processing start @@@@@@@@@ \n" );
1275
1275
@@ -1305,18 +1305,18 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1305
1305
page_p = context_p -> byte_code .first_p ;
1306
1306
offset = 0 ;
1307
1307
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;
1320
1320
// PRINT THE LITERAL IN THE CBC_CODES TO CHECK IT << NOT FINAL
1321
1321
// const uint8_t *char_p = literal_p->u.char_p;
1322
1322
// printf("\n");
@@ -1327,11 +1327,11 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1327
1327
// size--;
1328
1328
// }
1329
1329
// 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 */
1335
1335
1336
1336
while (page_p != last_page_p || offset < last_position )
1337
1337
{
@@ -1596,10 +1596,11 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1596
1596
printf ("<<< compressed bytecode: %d " , debug_func_bytecode_data_cp );
1597
1597
uint32_t rel_offset = (uint32_t )debug_func_bytecode_data_cp - (uint32_t )rel_offset_tmp ;
1598
1598
//context_p->line_info.pairs[bp_count].offset = rel_offset;
1599
- printf ("<<< line_info.pairs[%d].offset: %p\n" , bp_count , rel_offset );
1600
-
1601
1599
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 );
1602
1602
bp_count ++ ;
1603
+
1603
1604
}
1604
1605
#endif /* !PARSER_DEBUG */
1605
1606
@@ -1740,13 +1741,15 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1740
1741
context_p -> header_info .start_address_p = compiled_code_p ;
1741
1742
context_p -> header_info .name_len = 0 ;
1742
1743
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;
1750
1753
#endif /* PARSER_DEBUG */
1751
1754
1752
1755
#ifdef PARSER_DUMP_BYTE_CODE
0 commit comments