コード例 #1
0
ファイル: ForeignFunctions.java プロジェクト: chumer/fastr
 @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();
   }
 }
コード例 #2
0
ファイル: ForeignFunctions.java プロジェクト: chumer/fastr
 protected RuntimeException fallback(Object fobj) {
   String name = null;
   if (fobj instanceof RList) {
     name = lookupName((RList) fobj);
     name = name == UNKNOWN_EXTERNAL_BUILTIN ? null : name;
     if (name != null && lookupBuiltin((RList) fobj) != null) {
       /*
        * if we reach this point, then the cache saw a different value for f. the lists
        * that contain the information about native calls are never expected to change.
        */
       throw RInternalError.shouldNotReachHere(
           "fallback reached for " + getRBuiltin().name() + " " + name);
     }
   }
   throw RError.nyi(
       this,
       getRBuiltin().name() + " specialization failure: " + (name == null ? "<unknown>" : name));
 }
コード例 #3
0
ファイル: ForeignFunctions.java プロジェクト: chumer/fastr
 @Override
 public final Object call(RArgsValuesAndNames args) {
   throw RInternalError.unimplemented("unimplemented external builtin: " + name);
 }