4 * Ullrich von Bassewitz, 07.06.1998
14 /*****************************************************************************/
16 /*****************************************************************************/
20 /* Structure that holds all data needed for function activation */
21 typedef struct Function Function;
23 /* Function activation data for current function (or NULL) */
24 extern Function* CurrentFunc;
28 /*****************************************************************************/
30 /*****************************************************************************/
34 const char* GetFuncName (const Function* F);
35 /* Return the name of the current function */
37 unsigned GetParamSize (const Function* F);
38 /* Return the parameter size for the current function */
40 type* GetReturnType (Function* F);
41 /* Get the return type for the function */
43 int HasVoidReturn (const Function* F);
44 /* Return true if the function does not have a return value */
46 void RememberEntry (Function* F);
47 /* Remember the current output position for local space creation later */
49 unsigned GetRetLab (const Function* F);
50 /* Return the return jump label */
52 int AllocLocalSpace (Function* F, unsigned Size);
53 /* Allocate space for the function locals, return stack offset */
55 void FreeLocalSpace (Function* F, unsigned Size);
56 /* Free space allocated for function locals */
58 void NewFunc (struct SymEntry* Func);
59 /* Parse argument declarations and function body. */
61 unsigned GetLocalSpace (const Function* F);
62 /* Get the local variable space needed for the function */
66 /* End of function.h */