Merge the 2.063 frontend.

This commit is contained in:
David Nadlinger
2013-06-07 05:17:29 +02:00
parent 981a6af17e
commit 292caa1438
90 changed files with 10179 additions and 8105 deletions

View File

@@ -36,12 +36,7 @@ int Expression::apply(fp_t fp, void *param)
/******************************
* Perform apply() on an t if not null
*/
template<typename T>
int condApply(T* t, fp_t fp, void* param)
{
return t ? t->apply(fp, param) : 0;
}
#define condApply(t, fp, param) (t ? t->apply(fp, param) : 0)
int NewExp::apply(int (*fp)(Expression *, void *), void *param)
{
@@ -129,14 +124,20 @@ int AssocArrayLiteralExp::apply(fp_t fp, void *param)
int StructLiteralExp::apply(fp_t fp, void *param)
{
return condApply(elements, fp, param) ||
if(stageflags & stageApply) return 0;
int old = stageflags;
stageflags |= stageApply;
int ret = condApply(elements, fp, param) ||
(*fp)(this, param);
stageflags = old;
return ret;
}
int TupleExp::apply(fp_t fp, void *param)
{
return condApply(exps, fp, param) ||
return (e0 ? (*fp)(e0, param) : 0) ||
condApply(exps, fp, param) ||
(*fp)(this, param);
}