+2007-05-10 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/SDCCast.c (createFunction): also generate non-inlined version of
+ function for functions declared as "static inline"
+ * src/SDCCast.c (fixupInline, inlineAddDecl): reset symbol state so
+ function can be inlined after non-inlined version generated.
+
2007-05-10 Borut Razem <borut.razem AT siol.net>
* support/scripts/gen_known_bugs.pl: added script
sym->level = level;
sym->block = currBlockno;
+ sym->reqv = NULL;
+ SYM_SPIL_LOC (sym) = NULL;
+ sym->key = 0;
+
/* If the symbol is a label, we need to renumber it */
if (sym->islbl)
fixupInlineLabel (sym);
static void
inlineAddDecl (symbol * sym, ast * block, int addSymTab)
{
+ sym->reqv = NULL;
+ SYM_SPIL_LOC (sym) = NULL;
+ sym->key = 0;
if (block != NULL)
{
symbol **decl = &(block->values.sym);
if (fatalError)
goto skipall;
- /* Do not generate code for inline functions unless extern also */
+ /* Do not generate code for inline functions unless extern also. */
+#if 0
if (FUNC_ISINLINE (name->type) && !IS_EXTERN (fetype))
goto skipall;
+#else
+ /* Temporary hack: always generate code for static inline functions. */
+ /* Ideally static inline functions should only be generated if needed. */
+ if (FUNC_ISINLINE (name->type) && !IS_EXTERN (fetype) && !IS_STATIC (fetype))
+ goto skipall;
+#endif
/* create the node & generate intermediate code */
GcurMemmap = code;