should make non locals-marshalling/overlaptemps much faster

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1706 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-12-14 21:03:18 +00:00
parent 811d31569e
commit 9776d00e71

View file

@ -937,7 +937,7 @@ static QCC_def_t *QCC_GetTemp(QCC_type_t *type)
var_c->temp = t; var_c->temp = t;
t->lastfunc = pr_scope; t->lastfunc = pr_scope;
} }
else else if (opt_locals_marshalling)
{ {
//allocate a new one //allocate a new one
t = qccHunkAlloc(sizeof(temp_t)); t = qccHunkAlloc(sizeof(temp_t));
@ -954,6 +954,12 @@ static QCC_def_t *QCC_GetTemp(QCC_type_t *type)
var_c->temp = t; var_c->temp = t;
t->lastfunc = pr_scope; t->lastfunc = pr_scope;
} }
else
{
// we're not going to reallocate any temps so allocate permanently
var_c->ofs = QCC_GetFreeOffsetSpace(type->size);
numtemps+=type->size;
}
var_c->s_file = s_file; var_c->s_file = s_file;
var_c->s_line = pr_source_line; var_c->s_line = pr_source_line;