diff options
| author | grischka <grischka> | 2009-06-29 20:14:53 +0100 |
|---|---|---|
| committer | unknown <gr@.(none)> | 2009-07-18 21:55:06 +0200 |
| commit | d0b432ab38b09cd167d8a8065ffe1e14878d6e2d (patch) | |
| tree | 09afcf319229a51f3a972cbd097f58d3d23239f3 /tcc.h | |
| parent | 5e83b64dae59306bf474330396ab0c18c2c42768 (diff) | |
| download | tinycc-d0b432ab38b09cd167d8a8065ffe1e14878d6e2d.tar.gz tinycc-d0b432ab38b09cd167d8a8065ffe1e14878d6e2d.tar.bz2 | |
cleanup: stop abuse of sym->r for inline functions
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -262,7 +262,6 @@ typedef struct { #define FUNC_CALL(r) (((func_attr_t*)&(r))->func_call) #define FUNC_EXPORT(r) (((func_attr_t*)&(r))->func_export) #define FUNC_ARGS(r) (((func_attr_t*)&(r))->func_args) -#define INLINE_DEF(r) (*(int **)&(r)) /* -------------------------------------------------- */ #define SYM_STRUCT 0x40000000 /* struct/union/enum symbol space */ @@ -331,6 +330,13 @@ typedef struct TokenString { int last_line_num; } TokenString; +/* inline functions */ +typedef struct InlineFunc { + int *token_str; + Sym *sym; + char filename[1]; +} InlineFunc; + /* include file cache, used to find files faster and also to eliminate inclusion if the include file is protected by #ifndef ... #endif */ typedef struct CachedInclude { @@ -362,7 +368,6 @@ typedef struct ASMOperand { int is_memory; /* true if memory operand */ int is_rw; /* for '+' modifier */ } ASMOperand; - #endif struct TCCState { @@ -479,6 +484,9 @@ struct TCCState { /* for tcc_relocate */ int runtime_added; + struct InlineFunc **inline_fns; + int nb_inline_fns; + #ifdef TCC_TARGET_X86_64 /* write PLT and GOT here */ char *runtime_plt_and_got; |
