Add multithreading

This commit is contained in:
Augusto Gunsch
2020-12-29 21:27:48 -03:00
parent b49d0f1868
commit 144a33a603
12 changed files with 323 additions and 62 deletions

View File

@@ -391,16 +391,6 @@ LINEBLOCK* compileclass(COMPILER* c, CLASS* class) {
return output;
}
void compile(COMPILER* c) {
LINEBLOCK* output = NULL;
CLASS* curr = c->classes;
while(curr != NULL) {
output = mergelnblks(output, compileclass(c, curr));
curr = curr->next;
}
c->output = output;
}
COMPILER* mkcompiler(CLASS* classes) {
COMPILER* c = (COMPILER*)malloc(sizeof(COMPILER));
c->globalscope = mkscope(NULL);

View File

@@ -7,10 +7,8 @@
typedef struct {
CLASS* classes;
SCOPE* globalscope;
LINEBLOCK* output;
} COMPILER;
COMPILER* mkcompiler(CLASS* classes);
void compile(COMPILER* c);
LINEBLOCK* compileclass(COMPILER* c, CLASS* class);
#endif