argArray.values().toArray(args);
int i = 0; for (ArrayValue.Entry head = argArray.getHead(); head != null; head = head.getNext()) { args[i++] = head.getRawValue(); }
  public static Value call_user_func_array(Env env,                                           Callback function,                                           Value arg)    throws Throwable  {    ArrayValue argArray;    if (arg instanceof ArrayValue)      argArray = (ArrayValue) arg;    else      argArray = new ArrayValueImpl().append(arg);    Value []args;    if (argArray != null) {      args = new Value[argArray.getSize()];      argArray.values().toArray(args);    }    else      args = new Value[0];    return function.eval(env, args).copyReturn();  }