body = new Pair(new Pair(Symbol.LAMBDA, new Pair(null, m_initializer)), body);
setPosURLs(m_initializer, "initializer");
}
Function func = null;
Compiler compiler = new Compiler();
if (m_nLoopCount > 0)
{
Pair argTail = null;
Pair loopVariables = null;
m_loopFunctionArray = new Function[m_nLoopCount];
for (int nLoop = 0; nLoop < m_nLoopCount; nLoop++)
{
m_loopFunctionArray[nLoop] = compiler.compile(
Pair.list(Symbol.LAMBDA, loopVariables, getLoopVarExpr(nLoop)),
m_posMap, m_urlMap, machine, false
);
if (loopVariables == null)
{
loopVariables = new Pair(getLoopVarSymbol(nLoop));
argTail = loopVariables;
}
else
{
argTail.setTail(argTail = new Pair(getLoopVarSymbol(nLoop)));
}
}
m_allVariables = Pair.append(loopVariables, m_variables);
}
else
{
m_allVariables = m_variables;
}
try
{
body = Pair.list(Symbol.LAMBDA, m_allVariables, new Pair(Symbol.VECTOR, body));
// Set the top level code's URL
Object pos = new TextPosition(0, 0);
m_posMap.put(body, pos);
m_urlMap.put(pos, URL_PREFIX + getName());
func = compiler.compile(body, m_posMap, m_urlMap, machine, false);
}
catch (CompilerException e)
{
MetadataValidationException x = new MetadataValidationException(e);