Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IListWriter.done()


    IListWriter w = codeblock.vf.listWriter();
    for(IValue vlabel : labels){
      String label = ((IString) vlabel).getValue();
      w.append(codeblock.vf.integer(codeblock.getLabelPC(label)));
    }
    codeblock.addCode1(opcode.getOpcode(), codeblock.getConstantIndex(w.done()));
  }
}
View Full Code Here


        IListWriter w = vf.listWriter();
        for(String uid_testsuite: testsuites){
          IList test_results = (IList)rvm.executeProgram(uid_testsuite, arguments);
          w.insertAll(test_results);
        }
        result = w.done();
      } else {
        /*
         * Standard execution of main function
         */
        if((uid_main == null)) {
View Full Code Here

      // System.err.println("i = " + i + ": " + fromColor + " " + toColor
      // + " " + (1.0f * i)/max);
      w.append(vf.integer(myLerpColor(fromColor, toColor, (1.0f * i)
          / max)));
    }
    return w.done();
  }

  public IInteger gray(IInteger r) {
    int g = r.intValue();
    return vf.integer(figureColor(g, g, g));
View Full Code Here

    String strings[] = new String[colorNames.size()];
    Arrays.sort(colorNames.keySet().toArray(strings));
    for (String s : strings) {
      w.append(vf.string(s));
    }
    return w.done();
  }

  /**
   * List of default colors for errors
   */
 
View Full Code Here

 
  private IValue genList(Type type){
    IListWriter writer = vf.listWriter(); // type.writer(vf);

    if (maxDepth <= 0 || (stRandom.nextInt(2) == 0)) {
      return writer.done();
    } else {
      RandomValueTypeVisitor visitor = descend();
      IValue element = visitor.generate(type.getElementType());
      if (element != null) {
        writer.append(element);
View Full Code Here

      IValue element = visitor.generate(type.getElementType());
      if (element != null) {
        writer.append(element);
      }
      writer.appendAll((IList) visitor.generate(type));
      return writer.done();
    }
  }

  @Override
  public IValue visitList(Type type) {
View Full Code Here

            IListWriter w = vf.listWriter();
            IList args = TreeAdapter.getArgs(tree);
            for (IValue elem : args) {
              w.append(elem.accept(this));
            }
            args = w.done();

            return TreeAdapter.setArgs(tree, args);
          }

          IConstructor type = retrieveHoleType(tree);
View Full Code Here

        public IConstructor visitTreeAmb(IConstructor arg)  {
          ISetWriter w = vf.setWriter();
          for (IValue elem : TreeAdapter.getAlternatives(arg)) {
            w.insert(elem.accept(this));
          }
          return arg.set("alternatives", w.done());
        }
      });
    }
  
//    private static boolean containsBackTick(char[] data, int offset) {
View Full Code Here

      if (elem != null) {
        w.insert(elem);
      }
    }

    result = w.done();
    return result;
  }

  private IValue readMap(Map<?,?> o, Set<Class<?>> includes, Map<Object, IValue> cache, Stack<Object> stack) {
    IValue result;
View Full Code Here

      if (elem != null) {
        w.insert(elem);
      }
    }

    result = w.done();
    return result;
  }

  private boolean instanceOfCheck(Object o, Set<Class<?>> includes) {
    for (Class<?> clazz : includes) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.