Remove OS for now (causing assembly bug)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <pthread.h>
|
||||
#include "compiler.h"
|
||||
#include "compiler-scopes.h"
|
||||
#include "os.h"
|
||||
|
||||
typedef enum { local, staticseg, arg, fieldseg } MEMSEGMENT;
|
||||
char* memsegnames[] = { "local", "static", "argument", "this" };
|
||||
@@ -115,7 +114,7 @@ CLASS* getclass(SCOPE* s, const char* name) {
|
||||
}
|
||||
if(s->previous != NULL)
|
||||
return getclass(s->previous, name);
|
||||
return getosclass(s->compiler->os, name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SUBROUTDEC* getsubroutdecfromlist(SUBROUTDEC* start, char* name) {
|
||||
@@ -175,14 +174,10 @@ SUBROUTDEC* getsubroutdecwithoutparent(SCOPE* s, SUBROUTCALL* call) {
|
||||
SUBROUTDEC* getsubroutdecfromcall(SCOPE* s, SUBROUTCALL* call, VAR** varret) {
|
||||
SUBROUTDEC* d;
|
||||
*varret = NULL;
|
||||
if(call->parentname != NULL) {
|
||||
d = getossubroutdec(s->compiler->os, call);
|
||||
if(d == NULL)
|
||||
d = getsubroutdecwithparent(s, call, varret);
|
||||
}
|
||||
else {
|
||||
if(call->parentname != NULL)
|
||||
d = getsubroutdecwithparent(s, call, varret);
|
||||
else
|
||||
d = getsubroutdecwithoutparent(s, call);
|
||||
}
|
||||
if(d == NULL)
|
||||
notdeclared(call->name, call->debug);
|
||||
return d;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include <stdlib.h>
|
||||
#include "os.h"
|
||||
#include "compiler-structure.h"
|
||||
#include "compiler.h"
|
||||
|
||||
@@ -28,7 +27,6 @@ COMPILER* mkcompiler(CLASS* classes) {
|
||||
c->globalscope->compiler = c;
|
||||
c->globalscope->classes = classes;
|
||||
c->classes = classes;
|
||||
c->os = mkos();
|
||||
pthread_mutex_init(&(c->ifmutex), NULL);
|
||||
pthread_mutex_init(&(c->whilemutex), NULL);
|
||||
pthread_mutex_init(&(c->staticmutex), NULL);
|
||||
@@ -39,8 +37,6 @@ void freecompiler(COMPILER* c) {
|
||||
pthread_mutex_destroy(&(c->ifmutex));
|
||||
pthread_mutex_destroy(&(c->whilemutex));
|
||||
pthread_mutex_destroy(&(c->staticmutex));
|
||||
// to be continued
|
||||
freeos(c->os);
|
||||
freescope(c->globalscope);
|
||||
free(c);
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ typedef struct compiler {
|
||||
pthread_mutex_t whilemutex;
|
||||
pthread_mutex_t staticmutex;
|
||||
CLASS* classes;
|
||||
CLASS* os;
|
||||
struct scope* globalscope;
|
||||
} COMPILER;
|
||||
|
||||
|
Reference in New Issue
Block a user