Package frege.runtime

Examples of frege.runtime.Lazy


    }
    if (make) {
      Job job = new Job("Getting Modules") {
        public IStatus run(IProgressMonitor moni) {
          moni.worked(10);
          Lazy value = Delayed.<Lazy>forced(
              PreludeBase.TST.performUnsafe(
                  Utilities.initRoot(
                      fregeData.getFp()
                      ) // .<Lambda>forced()
                      ));
View Full Code Here


    return parser.ourRoot();
  }
 
  public void justCompiled() {
    synchronized (packs) {
      Lazy x = ourRoot();
      Lazy y = Delayed.<Lazy>forced(
        PreludeBase.TST.performUnsafe(Utilities.justCompiled(global, x))
      );
      packs.put(fregeData.getBp(), y);
    }
  }
View Full Code Here

          && 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 "
View Full Code Here

TOP

Related Classes of frege.runtime.Lazy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.