Add #+escape-analysis and #+no-escape-analysis file tags, and keep the syntactic check of unsafe returns where the escape analysis is disabled

This commit is contained in:
gingerBill committed 2026-10-07 21:06:56 +01:00
1 parent 6784db9f86
commit d728de8a20
7 files changed
+166 -7

No files matched your search

+2 -2
View File
@@ -6852,7 +6852,7 @@ gb_internal bool check_proc_info(Checker *c, ProcInfo *pi, UntypedExprInfoMap *u
if (body_was_checked) {
pi->decl->proc_info = pi;
if (!build_context.no_escape_analysis) {
if (escape_analysis_in_use()) {
per_thread_array_add(&c->info.checked_bodies_queue, pi);
}
pi->decl->proc_checked_state.store(ProcCheckedState_Checked);
@@ -8074,7 +8074,7 @@ gb_internal void check_parsed_files(Checker *c) {
debugf("Total Procedure Bodies Checked: %td\n", total_bodies_checked.load(std::memory_order_relaxed));
if (!build_context.no_escape_analysis) {
if (escape_analysis_in_use()) {
TIME_SECTION("check escapes");
check_escapes(c);
}