aboutsummaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compiler.h')
-rw-r--r--include/compiler.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/compiler.h b/include/compiler.h
index 08b74b8..ac50d28 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -5,7 +5,7 @@
#include "std/buffer.h"
#include "std/buffer_view.h"
#include "std/arena_allocator.h"
-#include "std/thread.h"
+#include "std/thread_pool.h"
#include "compiler_options.h"
#include "ast.h"
#include "program.h"
@@ -49,20 +49,17 @@ struct amal_compiler {
ArenaAllocator allocator;
Scope root_scope;
Buffer/*<Parser*>*/ parsers;
- Buffer/*<FileScopeReference*>*/ queued_files;
HashMapType(BufferView, FileScopeReference*) file_scopes;
- ParserThreadData *threads;
- int usable_thread_count;
bool started;
- bool work_failed;
amal_mutex mutex;
- int generic_work_object_index;
+ amal_thread_pool stage_task_thread_pool;
};
void amal_compiler_options_init(amal_compiler_options *self);
/*
If @options is NULL, then default values are used.
+ @options are copied.
You should run @amal_program_deinit even @amal_compiler_load_file fails, to cleanup memory.
This function creates a copy of @filepath so it doesn't have to survive longer than this function call.
The file has to be in utf-8 format and it can optionally have utf-8 BOM.