// INFO duplicate code is for faster execution -> less contions
// debug yes
if(pc.getConfig().debug()) {
DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,pageSource,udf.getFunctionName());//new DebugEntry(src,udf.getFunctionName());
int currTime=pc.getExecutionTime();
long time=System.nanoTime();
// sync yes
if(top.properties._synchronized){
synchronized (this) {
try {
parent=beforeCall(pc);
if(args!=null)rtn=udf.call(pc,calledName,args,true);
else rtn=udf.callWithNamedValues(pc,calledName,namedArgs,true);
}
finally {
pc.setVariablesScope(parent);
int diff= ((int)(System.nanoTime()-time)-(pc.getExecutionTime()-currTime));
pc.setExecutionTime(pc.getExecutionTime()+diff);
debugEntry.updateExeTime(diff);
}
}
}
// sync no
else {
try {
parent=beforeCall(pc);
if(args!=null)rtn=udf.call(pc,calledName,args,true);
else rtn=udf.callWithNamedValues(pc,calledName,namedArgs,true);
}
finally {
pc.setVariablesScope(parent);
int diff= ((int)(System.nanoTime()-time)-(pc.getExecutionTime()-currTime));
pc.setExecutionTime(pc.getExecutionTime()+diff);
debugEntry.updateExeTime(diff);
}
}
}