&& index < 2) { // do lexer and parser synchronized
t1 = System.nanoTime();
index++;
passes = pass.mem2.<TList>forced();
final TTuple2 adx = Delayed.<TTuple2>forced( pass.mem1 );
final Lazy action = index == 1 ? Main.lexPassIDE(contents) : Delayed.delayed(adx.mem1);
final String desc = Delayed.<String>forced(adx.mem2);
final TGlobal g = runSTIO(action, global);
te = System.nanoTime();
System.err.println(desc + " took "
+ (te-t1)/1000000 + "ms, cumulative "
+ (te-t0)/1000000 + "ms");
monitor.worked(1);
global = runSTG(Utilities.passDone, g);
}
if (achievement(global) >= achievement(goodglobal))
goodglobal = global; // when opening a file with errors
else {
// update token array in goodglobal
TToken[] toks = TSubSt.toks(TGlobal.sub(global));
goodglobal = TGlobal.upd$sub(goodglobal, TSubSt.upd$toks(
TGlobal.sub(goodglobal), toks));
}
// Array gtoks = TSubSt.toks(TGlobal.sub(global));
// System.err.println("global.toks==good.toks is " + (toks == gtoks));
}
int needed = (int) ((te-t0) / 1000000);
if (scanOnly && timeout - needed > 0 && errors(global) == 0 && !monitor.isCanceled())
try { Thread.sleep(timeout - needed); } catch (InterruptedException e) {}
t0 = System.nanoTime() - (te-t0);
while (!monitor.isCanceled()
&& errors(global) == 0
&& (pass = passes._Cons()) != null) { // do the rest unsynchronized
t1 = System.nanoTime();
passes = pass.mem2.<TList>forced();
index++;
final TTuple2 adx = Delayed.<TTuple2>forced( pass.mem1 );
final Lazy action = Delayed.delayed(adx.mem1);
final String desc = Delayed.<String>forced(adx.mem2);
final TGlobal g = runSTIO(action, global);
te = System.nanoTime();
System.err.println(desc + " took "
+ (te-t1)/1000000 + "ms, cumulative "