/** * Optimize the body of all global functions. This may involve inlining functions calls */ protected void optimizeGlobalFunctions() throws XPathException { Iterator iter = functions.values().iterator(); while (iter.hasNext()) { XQueryFunction fn = (XQueryFunction)iter.next(); fn.optimize(); } }
/** * Optimize the body of all global functions. This may involve inlining functions calls */ protected void optimizeGlobalFunctions() throws XPathException { Iterator iter = functions.values().iterator(); while (iter.hasNext()) { XQueryFunction fn = (XQueryFunction)iter.next(); fn.optimize(); } }
/** * Optimize the body of all global functions. This may involve inlining functions calls * * @throws net.sf.saxon.trans.XPathException * if an error occurs * @param topModule the top level module of the compilation unit whose functions are * to be optimized; functions in separately-compiled imported libraries * are unaffected. */ protected void optimizeGlobalFunctions(QueryModule topModule) throws XPathException { for (XQueryFunction fn : functions.values()) { if (((QueryModule)fn.getStaticContext()).getTopLevelModule() == topModule) { fn.optimize(); } } }
/** * Optimize the body of all global functions. This may involve inlining functions calls * * @throws net.sf.saxon.trans.XPathException * if an error occurs * @param topModule the top level module of the compilation unit whose functions are * to be optimized; functions in separately-compiled imported libraries * are unaffected. */ protected void optimizeGlobalFunctions(QueryModule topModule) throws XPathException { for (XQueryFunction fn : functions.values()) { if (((QueryModule)fn.getStaticContext()).getTopLevelModule() == topModule) { fn.optimize(); } } }