mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
Add some docs to function.h
This commit is contained in:
parent
5acf474882
commit
f30010b367
1 changed files with 24 additions and 6 deletions
|
@ -31,11 +31,19 @@
|
|||
#ifndef __function_h
|
||||
#define __function_h
|
||||
|
||||
/** \defgroup qfcc_function Internal function structures.
|
||||
*/
|
||||
|
||||
#include "QF/pr_comp.h"
|
||||
#include "QF/pr_debug.h"
|
||||
|
||||
#include "def.h"
|
||||
|
||||
/** Represent an overloading of a function.
|
||||
|
||||
Every function, whether overloaded or not, has an entry in the overloaded
|
||||
function database.
|
||||
*/
|
||||
typedef struct overloaded_function_s {
|
||||
struct overloaded_function_s *next;
|
||||
const char *name; ///< source level name of function
|
||||
|
@ -47,6 +55,8 @@ typedef struct overloaded_function_s {
|
|||
int line; ///< source line of this function
|
||||
} overloaded_function_t;
|
||||
|
||||
/** Internal representation of a function.
|
||||
*/
|
||||
typedef struct function_s {
|
||||
struct function_s *next;
|
||||
int builtin; ///< if non 0, call an internal function
|
||||
|
@ -55,21 +65,29 @@ typedef struct function_s {
|
|||
int line_info;
|
||||
int local_defs;
|
||||
string_t s_file; ///< source file with definition
|
||||
string_t s_name;
|
||||
string_t s_name; ///< name of function in output
|
||||
int temp_num; ///< number for next temp var
|
||||
struct def_s *def;
|
||||
struct symbol_s *sym;
|
||||
struct def_s *def; ///< output def holding function number
|
||||
struct symbol_s *sym; ///< internal symbol for this function
|
||||
/** Root scope symbol table of the function.
|
||||
|
||||
Sub-scope symbol tables are not directly accessible, but all defs
|
||||
created in the function's local data space are recorded in the root
|
||||
scope symbol table's defspace.
|
||||
*/
|
||||
struct symtab_s *symtab;
|
||||
struct reloc_s *refs;
|
||||
struct reloc_s *refs; ///< relocation targets for this function
|
||||
struct expr_s *var_init;
|
||||
const char *name; ///< nice name for __PRETTY_FUNCTION__
|
||||
} function_t;
|
||||
|
||||
extern function_t *current_func;
|
||||
|
||||
/** Representation of a function parameter.
|
||||
\note The first two fields match the first two fields of keywordarg_t
|
||||
in method.h
|
||||
*/
|
||||
typedef struct param_s {
|
||||
// the first two fields match the first two fiels of keywordarg_t in
|
||||
// method.h
|
||||
struct param_s *next;
|
||||
const char *selector;
|
||||
struct type_s *type; //FIXME redundant
|
||||
|
|
Loading…
Reference in a new issue