diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 19:30:32 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 19:30:32 +0100 |
| commit | a36a8722dc823c6fe143f7935e79467c6569bc00 (patch) | |
| tree | 6dc0f7c0000150a7d4708b4384e785d4dd93cfea /src/error.cpp | |
| parent | 21b1173076cec12f97c5779556509ef1b908c644 (diff) | |
Minimize more thread contention
Diffstat (limited to 'src/error.cpp')
| -rw-r--r-- | src/error.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/error.cpp b/src/error.cpp index 10bf1caf5..53bc01654 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -153,6 +153,17 @@ gb_internal AstFile *thread_safe_get_ast_file_from_id(i32 index) { } +// use AFTER PARSER +gb_internal AstFile *thread_unsafe_get_ast_file_from_id(i32 index) { + GB_ASSERT(index >= 0); + AstFile *file = nullptr; + if (index < global_files.count) { + file = global_files[index]; + } + return file; +} + + // NOTE: defined in build_settings.cpp gb_internal bool global_warnings_as_errors(void); |