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 GetParamCount (const Function* F);
38 /* Return the parameter count for the current function */
40 unsigned GetParamSize (const Function* F);
41 /* Return the parameter size for the current function */
43 type* GetReturnType (Function* F);
44 /* Get the return type for the function */
46 int HasVoidReturn (const Function* F);
47 /* Return true if the function does not have a return value */
49 void RememberEntry (Function* F);
50 /* Remember the current output position for local space creation later */
52 unsigned GetRetLab (const Function* F);
53 /* Return the return jump label */
55 int ReserveLocalSpace (Function* F, unsigned Size);
56 /* Reserve (but don't allocate) the given local space and return the stack
60 void AllocLocalSpace (Function* F);
61 /* Allocate any local space previously reserved. The function will do
62 * nothing if there is no reserved local space.
65 void NewFunc (struct SymEntry* Func);
66 /* Parse argument declarations and function body. */
70 /* End of function.h */