Reintroduce event groups

This started with reverting commit 52cd02173d
and then rewriting it to be per handler rather than handler identifier
and adding support for hooks as well as adding implicit module groups.
This commit is contained in:
Arne Welzel 2022-10-25 16:53:17 +02:00
parent 5aa7d80e88
commit 2ad609cbbb
30 changed files with 730 additions and 49 deletions

View file

@ -59,7 +59,8 @@ const FuncInfo* analyze_global_stmts(Stmt* stmts)
auto sc = current_scope();
std::vector<IDPtr> empty_inits;
StmtPtr stmts_p{NewRef{}, stmts};
global_stmts = make_intrusive<ScriptFunc>(id, stmts_p, empty_inits, sc->Length(), 0);
global_stmts = make_intrusive<ScriptFunc>(id);
global_stmts->AddBody(stmts_p, empty_inits, sc->Length());
funcs.emplace_back(global_stmts, sc, stmts_p, 0);