diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 27b4fe0..d96e4e0 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -2337,13 +2337,8 @@ static int declloc(int fstatic) modstk(-(int)size*sizeof(cell)); assert(curfunc!=NULL); assert((curfunc->usage & uNATIVE)==0); - if (curfunc->flags & flagNAKED) { - if (curfunc->x.stacksizex.stacksize=declared; - } else { - if (curfunc->x.stacksizex.stacksize=declared+1; /* +1 for PROC opcode */ - } /* if */ + if (curfunc->x.stacksizex.stacksize=declared+1; /* +1 for PROC opcode */ } /* if */ /* now that we have reserved memory for the variable, we can proceed * to initialize it */ @@ -3161,10 +3156,7 @@ SC_FUNC symbol *fetchfunc(char *name,int tag) /* set library ID to NULL (only for native functions) */ sym->x.lib=NULL; /* set the required stack size to zero (only for non-native functions) */ - if (sym->flags & flagNAKED) - sym->x.stacksize=0; /* zero for naked functions */ - else - sym->x.stacksize=1; /* 1 for PROC opcode */ + sym->x.stacksize=1; /* 1 for PROC opcode */ } /* if */ if (pc_deprecate!=NULL) { assert(sym!=NULL); diff --git a/source/compiler/sc3.c b/source/compiler/sc3.c index 9cec309..e22de2c 100644 --- a/source/compiler/sc3.c +++ b/source/compiler/sc3.c @@ -2421,9 +2421,8 @@ static int nesting=0; /* maintain max. amount of memory used */ { long totalsize; - totalsize=declared+decl_heap; /* local variables & return value size */ - if ((sym->flags & flagNAKED)==0) - totalsize++; /* +1 for PROC opcode */ + totalsize=declared+decl_heap+1; /* local variables & return value size, + * +1 for PROC opcode */ if (lval_result->ident==iREFARRAY) totalsize++; /* add hidden parameter (on the stack) */ if ((sym->usage & uNATIVE)==0)