Iterator iter = queryLibraryModules.values().iterator();
while (iter.hasNext()) {
List modules = (List)iter.next();
Iterator iter2 = modules.iterator();
while (iter2.hasNext()) {
QueryModule env = (QueryModule)iter2.next();
env.bindUnboundVariables();
}
}
}
List varDefinitions = main.fixupGlobalVariables(main.getGlobalStackFrameMap());
main.bindUnboundFunctionCalls();
if (queryLibraryModules != null) {
Iterator iter = queryLibraryModules.values().iterator();
while (iter.hasNext()) {
List modules = (List)iter.next();
Iterator iter2 = modules.iterator();
while (iter2.hasNext()) {
QueryModule env = (QueryModule)iter2.next();
env.bindUnboundFunctionCalls();
}
}
}
// Note: the check for circularities between variables and functions has to happen
// before functions are compiled and optimized, as the optimization can involve function