*
* This method <b>must</b> be thread-safe.
*/
public Object call(List arguments, ExpressionContext context)
{
CompiledScript script = null;
try {
script = (CompiledScript) arguments.get(0);
} catch (ClassCastException cce) { }
if (script == null) return null;
ListData result = new ListData();
LocalExpressionContext lContext = new LocalExpressionContext(context);
ListStack stack = new ListStack();
Iterator i = collapseLists(arguments, 1).iterator();
Object item;
while (i.hasNext()) try {
lContext.setLocalValue(item = i.next());
stack.clear();
script.run(stack, lContext);
handleItem(result, item, stack.pop());
} catch (Exception e) {}
return result;
}