@@ -1037,7 +1037,7 @@ parse_print_final_cbc (ecma_compiled_code_t *compiled_code_p, /**< compiled code
1037
1037
}
1038
1038
1039
1039
JERRY_DEBUG_MSG ("\nFinal byte code dump:\n\n Maximum stack depth: %d\n Flags: [" ,
1040
- (int ) stack_limit );
1040
+ (int ) ( stack_limit + register_end ) );
1041
1041
1042
1042
if (!(compiled_code_p -> status_flags & CBC_CODE_FLAGS_FULL_LITERAL_ENCODING ))
1043
1043
{
@@ -1450,7 +1450,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1450
1450
needs_uint16_arguments = false;
1451
1451
total_size = sizeof (cbc_uint8_arguments_t );
1452
1452
1453
- if (( context_p -> register_count + context_p -> stack_limit ) > CBC_MAXIMUM_BYTE_VALUE
1453
+ if (context_p -> stack_limit > CBC_MAXIMUM_BYTE_VALUE
1454
1454
|| context_p -> literal_count > CBC_MAXIMUM_BYTE_VALUE )
1455
1455
{
1456
1456
needs_uint16_arguments = true;
@@ -1471,7 +1471,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1471
1471
{
1472
1472
cbc_uint16_arguments_t * args_p = (cbc_uint16_arguments_t * ) compiled_code_p ;
1473
1473
1474
- args_p -> stack_limit = ( uint16_t ) ( context_p -> register_count + context_p -> stack_limit ) ;
1474
+ args_p -> stack_limit = context_p -> stack_limit ;
1475
1475
args_p -> argument_end = context_p -> argument_count ;
1476
1476
args_p -> register_end = context_p -> register_count ;
1477
1477
args_p -> ident_end = ident_end ;
@@ -1485,7 +1485,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
1485
1485
{
1486
1486
cbc_uint8_arguments_t * args_p = (cbc_uint8_arguments_t * ) compiled_code_p ;
1487
1487
1488
- args_p -> stack_limit = (uint8_t ) ( context_p -> register_count + context_p -> stack_limit ) ;
1488
+ args_p -> stack_limit = (uint8_t ) context_p -> stack_limit ;
1489
1489
args_p -> argument_end = (uint8_t ) context_p -> argument_count ;
1490
1490
args_p -> register_end = (uint8_t ) context_p -> register_count ;
1491
1491
args_p -> ident_end = (uint8_t ) ident_end ;
0 commit comments