MWCC/compiler_and_linker/unsorted/CFunc.c

106 lines
5.3 KiB
C
Raw Normal View History

2022-11-07 03:06:21 +00:00
#include "compiler/CFunc.h"
#include "compiler/types.h"
FuncArg elipsis;
FuncArg oldstyle;
ObjectList *arguments;
ObjectList *locals;
short localcount;
SInt32 curstmtvalue;
SInt32 sourceoffset;
HashNameNode *sourcefilepath;
SInt32 functionbodyoffset;
HashNameNode *functionbodypath;
InitExpr *init_expressions;
CLabel *Labels;
CtorChain *ctor_chain;
Statement *curstmt;
static short temp_destructor_object_regmem;
static short temp_destructor_objects;
static short temp_expression_has_conditionals;
static DeclBlock *firstblock;
static DeclBlock *currentblock;
static short blockcount;
static Object *sinit_first_object;
static CLabel *sinit_label;
static Boolean ainit_only_one;
static ENode *ainit_expr;
static FuncArg *check_arglist;
static Boolean cfunc_is_extern_c;
static short cfunc_staticvarcount;
static void *destroyobjects;
static Boolean cfunc_hasdtortemp;
static void CFunc_LoopIncrement(void) {}
static void CFunc_LoopDecrement(void) {}
DeclBlock *CFunc_NewDeclBlock(void) {}
void CFunc_RestoreBlock(DeclBlock *block) {}
void CFunc_SetupLocalVarInfo(Object *obj) {}
static void adjustargumenttype(DeclInfo *declinfo) {}
static FuncArg *CFunc_IsInArgList(FuncArg *list, HashNameNode *name) {}
static Object *CFunc_IsInObjList(ObjectList *list, HashNameNode *name) {}
static void CFunc_AppendArg(FuncArg **list, FuncArg *arg) {}
static void identifier_list(DeclInfo *declinfo) {}
static Boolean defarg_name_obj_check(HashNameNode *name, Object *obj) {}
void CFunc_DefaultArg(Type *type, short qual, FuncArg *args) {}
static FuncArg *parameter_list(DeclInfo *declinfo) {}
Boolean CFunc_ParseFakeArgList(Boolean flag) {}
FuncArg *parameter_type_list(DeclInfo *declinfo) {}
CLabel *findlabel(void) {}
CLabel *newlabel(void) {}
Statement *CFunc_AppendStatement(StatementType sttype) {}
Statement *CFunc_InsertStatement(StatementType sttype, Statement *after) {}
Statement *CFunc_InsertBeforeStatement(StatementType sttype, Statement *before) {}
void CheckCLabels(void) {}
Object *create_temp_object(Type *type) {}
ENode *create_temp_node(Type *type) {}
ENode *create_temp_node2(Type *type) {}
static void CFunc_DestroyReverse() {} // not sure about type
static void CFunc_TempTransDestroy() {} // not sure about type
void CFunc_WarnUnused(void) {}
void CFunc_CodeCleanup(Statement *stmt) {}
static Boolean DestructorNeeded(ExceptionAction *a, ExceptionAction *b) {}
static Statement *DestructLocals(Statement *stmt, ExceptionAction *exc1, ExceptionAction *exc2) {}
static Boolean NeedsDestruction(Statement *stmt1, Statement *stmt2) {}
static ExceptionAction *FindLastNonCommonStackObj(Statement *stmt1, Statement *stmt2) {}
static void DestructorReturnTransform(Statement *stmt1, Statement *stmt2) {}
static Statement *DestructorIfTransform(Statement *stmt) {}
static Boolean IsSubStack(ExceptionAction *exc1, ExceptionAction *exc2) {}
static void CFunc_CheckInitSkip(Statement *stmt, ExceptionAction *exc) {}
void CFunc_DestructorCleanup(Statement *stmt) {}
static void scancase(DeclThing *thing) {}
static void CFunc_NameLocalStaticDataObject(Object *obj, char *str) {}
static void sinit_insert_expr(ENode *expr) {}
static void ainit_insert_expr(ENode *expr) {}
static ENode *ainit_register_object(TypeClass *tclass, Object *local, SInt32 offset, void *unk) {}
static void CFunc_LocalDataDeclarator(DeclInfo *declinfo, TStreamElement *element, Boolean flag1, Boolean flag2) {}
static ENode *CFunc_ParseLocalDeclarationList(Boolean flag1, Boolean flag2, Boolean flag3, Boolean flag4) {}
static void makeifstatement(ENode *expr, CLabel *label1, CLabel *label2, Boolean flag1, Boolean flag2) {}
static void CFunc_HasDtorTempCallBack(ENode *expr) {}
static void ifstatement(Boolean flag1, ENode *expr, CLabel *label, Boolean flag2) {}
Statement *CFunc_GenerateLoop(Statement *stmt, Type *type, ENode *expr1, ENode *expr2, ENode *expr3, ENode *expr4, ENode (*callback)(ENode *, ENode *)) {}
static Boolean checklabel(void) {}
static ENode *returnstatementadjust(ENode *expr, Type *type, UInt32 qual) {}
static void CFunc_AutoResultCheck(ENode *expr) {}
static void statement(DeclThing *thing) {}
void CFunc_CompoundStatement(DeclThing *thing) {}
static void CFunc_InsertArgumentCopyConversion(Object *obj, Type *type1, Type *type2, Boolean flag) {}
static void CFunc_AdjustOldStyleArgs(void) {}
void CFunc_SetupNewFuncArgs(Object *obj, FuncArg *args) {}
static ObjectList *CFunc_CopyObjectList(ObjectList *list) {}
static void SetupFunctionArguments(Object *obj, DeclInfo *declinfo) {}
2022-12-29 12:32:55 +00:00
NameSpace *CFunc_FuncGenSetup(Statement *stmt, Object *func) {}
2022-11-07 03:06:21 +00:00
void CFunc_GetGlobalCompilerState(CFuncSave *state) {}
void CFunc_SetGlobalCompilerState(CFuncSave *state) {}
void CFunc_Gen(Statement *stmt, Object *obj, UInt8 unk) {}
static void CFunc_CheckCtorInitializer(TypeClass *tclass, CtorChain *chain) {}
void CFunc_CheckClassCtors(TypeClass *tclass) {}
static void CFunc_ParseCtorInitializer(void) {}
static void CFunc_FunctionRedefinedCheck(Object *obj) {}
static Object *CFunc_DeclareFuncName(char *str, HashNameNode *name) {}
void CFunc_ParseFuncDef(Object *obj, DeclInfo *declinfo, TypeClass *tclass, Boolean is_method, Boolean is_static, NameSpace *nspace) {}
void InitExpr_Register(ENode *expr, Object *object) {}
void CFunc_GenerateDummyFunction(Object *a) {}
void CFunc_GenerateSingleExprFunc(Object *a, ENode *expr) {}
void CFunc_GenerateDummyCtorFunc(Object *a, Object *b) {}