Beispiel #1
0
 @TruffleBoundary
 protected static Object encodeArgumentPairList(RArgsValuesAndNames args, String symbolName) {
   Object list = RNull.instance;
   for (int i = args.getLength() - 1; i >= 0; i--) {
     String name = args.getSignature().getName(i);
     list =
         RDataFactory.createPairList(
             args.getArgument(i),
             list,
             name == null ? RNull.instance : RDataFactory.createSymbolInterned(name));
   }
   list = RDataFactory.createPairList(symbolName, list);
   return list;
 }
Beispiel #2
0
 @Override
 public Object getRelementImpl(int index) {
   if (index == 0) {
     String name = getBuiltin().getName();
     assert name == name.intern();
     return RDataFactory.createSymbol(name);
   } else {
     throw RInternalError.unimplemented();
   }
 }