Mercurial > projects > ddmd
view dmd/InlineDoState.d @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | be2ab491772e |
line wrap: on
line source
module dmd.InlineDoState; import dmd.Array; import dmd.Dsymbol; import dmd.VarDeclaration; import dmd.Expression; import dmd.ArrayTypes; class InlineDoState { VarDeclaration vthis; Array from; // old Dsymbols Array to; // parallel array of new Dsymbols Dsymbol parent; // new parent this() { from = new Array(); to = new Array(); } } /****************************** * Perform doInline() on an array of Expressions. */ Expressions arrayExpressiondoInline(Expressions a, InlineDoState ids) { Expressions newa = null; if (a) { newa = new Expressions(); newa.setDim(a.dim); for (int i = 0; i < a.dim; i++) { Expression e = cast(Expression)a.data[i]; if (e) { e = e.doInline(ids); newa.data[i] = cast(void*)e; } } } return newa; }