Esempio n. 1
0
 protected String getNameFromSymbolInfo(VirtualFrame frame, RList symbol) {
   if (nameExtract == null) {
     CompilerDirectives.transferToInterpreterAndInvalidate();
     nameExtract = ExtractVectorNode.create(ElementAccessMode.SUBSCRIPT, true);
   }
   return RRuntime.asString(nameExtract.applyAccessField(frame, symbol, "name"));
 }
Esempio n. 2
0
 protected String lookupName(RList f) {
   if (f.getNames() != null) {
     RAbstractStringVector names = f.getNames();
     for (int i = 0; i < names.getLength(); i++) {
       if (names.getDataAt(i).equals("name")) {
         String name = RRuntime.asString(f.getDataAt(i));
         return name != null ? name : UNKNOWN_EXTERNAL_BUILTIN;
       }
     }
   }
   return UNKNOWN_EXTERNAL_BUILTIN;
 }