Merge pull request #15284 from s-hadinger/berry_lv_stack

Berry improve asserts and stack size
This commit is contained in:
s-hadinger 2022-04-04 09:40:45 +02:00 committed by GitHub
commit aa6429d168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -251,6 +251,17 @@ extern "C" {
#ifdef USE_BERRY_DEBUG
#undef BE_DEBUG_RUNTIME_INFO
#define BE_DEBUG_RUNTIME_INFO 1 /* record line information in 32 bits to be places in IRAM */
#undef BE_DEBUG
#define BE_DEBUG 1
#undef be_assert
#define be_assert(expr) \
((expr) \
? (0) \
: serial_debug("BRY: ASSERT '%s', %s - %i\n", #expr, __FILE__, __LINE__))
#ifdef USE_LVGL
#undef BE_STACK_START
#define BE_STACK_START 200
#endif // USE_LVGL
#endif // USE_BERRY_DEBUG
#endif

View File

@ -1694,7 +1694,7 @@ static void statement(bparser *parser)
case OptSemic: scan_next_token(parser); break; /* empty statement */
default: expr_stmt(parser); break;
}
be_assert(parser->finfo->freereg == be_list_count(parser->finfo->local));
be_assert(parser->finfo->freereg >= be_list_count(parser->finfo->local));
}
static void stmtlist(bparser *parser)