]> git.sur5r.net Git - cc65/blob - src/cc65/function.h
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / src / cc65 / function.h
1 /*
2  * function.h
3  *
4  * Ullrich von Bassewitz, 07.06.1998
5  */
6
7
8
9 #ifndef FUNCTION_H
10 #define FUNCTION_H
11
12
13
14 /*****************************************************************************/
15 /*                                   data                                    */
16 /*****************************************************************************/
17
18
19
20 /* Structure that holds all data needed for function activation */
21 typedef struct Function Function;
22
23 /* Function activation data for current function (or NULL) */
24 extern Function* CurrentFunc;
25
26
27
28 /*****************************************************************************/
29 /*                                   Code                                    */
30 /*****************************************************************************/
31
32
33
34 const char* GetFuncName (const Function* F);
35 /* Return the name of the current function */
36
37 unsigned GetParamSize (const Function* F);
38 /* Return the parameter size for the current function */
39
40 type* GetReturnType (Function* F);
41 /* Get the return type for the function */
42
43 int HasVoidReturn (const Function* F);
44 /* Return true if the function does not have a return value */
45
46 unsigned GetRetLab (const Function* F);
47 /* Return the return jump label */
48
49 unsigned AllocLocalSpace (Function* F, unsigned Size);
50 /* Allocate space for the function locals, return stack offset  */
51
52 void FreeLocalSpace (Function* F, unsigned Size);
53 /* Free space allocated for function locals */
54
55 void NewFunc (struct SymEntry* Func);
56 /* Parse argument declarations and function body. */
57
58
59
60 /* End of function.h */
61 #endif
62
63
64