aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index b1518533e..b83822cbf 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -731,8 +731,12 @@ struct Ast {
// NOTE(bill): I know I dislike methods but this is hopefully a temporary thing
// for refactoring purposes
- AstFile *file() const {
- return get_ast_file_from_id(this->file_id);
+ gb_inline AstFile *file() const {
+ // NOTE(bill): This doesn't need to call get_ast_file_from_id which
+ return global_files[this->file_id];
+ }
+ gb_inline AstFile *thread_safe_file() const {
+ return thread_safe_get_ast_file_from_id(this->file_id);
}
};