Package org.renjin.invoke.codegen

Examples of org.renjin.invoke.codegen.ArgumentIterator


   */
  public SEXP evaluateArgsAndInvoke(Object instance, Context context, Environment rho, PairList arguments) {
   
    // eval arguments
    List<SEXP> args = Lists.newArrayListWithCapacity(maxArgCount);
    ArgumentIterator it = new ArgumentIterator(context, rho, arguments);
    while(it.hasNext()) {
      args.add(context.evaluate( it.next(), rho));
    }
    return invoke(instance, context, args);
  }
View Full Code Here


      context.setInvisibleFlag();
      return Null.INSTANCE;
    }

    // evaluate the first arg
    ArgumentIterator argIt = new ArgumentIterator(context, rho, arguments);
    PairList.Node firstArgNode = argIt.nextNode();
    SEXP firstArg = context.evaluate( firstArgNode.getValue(), rho);
    if(firstArg.isObject()) {
      SEXP result = S3.tryDispatchFromPrimitive(context, rho, call, "rep", firstArg, arguments);
      if(result != null) {
        return result;
      }
    }

    // create a new pair list of evaluated arguments
    PairList.Builder evaled = new PairList.Builder();
    evaled.add(firstArgNode.getRawTag(), firstArg);
    while(argIt.hasNext()) {
      PairList.Node node = argIt.nextNode();
      evaled.add(node.getRawTag(), context.evaluate( node.getValue(), rho));
    }

    // declare formals
    PairList.Builder formals = new PairList.Builder();
View Full Code Here

      PairList args) {
   
    List<SEXP> constructorArgs = Lists.newArrayList();
    Map<Symbol, SEXP> propertyValues = Maps.newHashMap();
   
    ArgumentIterator argIt = new ArgumentIterator(context, rho, args);
    while(argIt.hasNext()) {
      PairList.Node node = argIt.nextNode();
      SEXP evaled = context.evaluate( node.getValue(), rho);
     
      if(node.hasTag()) {
        propertyValues.put(node.getTag(), evaled);
      } else {
View Full Code Here

TOP

Related Classes of org.renjin.invoke.codegen.ArgumentIterator

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.