Beispiel #1
0
 private bool fc_i(uint key, object value, fc_result res)
 {
     if (Parser.is_const_id(key))
     {
         return(false);
     }
     if (value is RModule || value is RClass)
     {
         RMetaObject va = (RMetaObject)value;
         if (va == res.klass)
         {
             res.path = fc_path(res, key);
             return(true);
         }
         if (va.iv_tbl == null)
         {
             return(false);
         }
         fc_result list = res;
         while (list != null)
         {
             if (list.end(va))
             {
                 return(false);
             }
             list = list.prev;
         }
         fc_result arg = new fc_result(key, res.klass, va, res);
         lock (va.iv_tbl.SyncRoot)
         {
             foreach (DictionaryEntry ent in va.iv_tbl)
             {
                 if (fc_i((uint)ent.Key, ent.Value, arg))
                 {
                     res.path = arg.path;
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
Beispiel #2
0
        private string fc_path(fc_result fc, uint name)
        {
            string path = ruby.id2name(name);
            string tmp;
            uint   cp = ruby.intern("__classpath__");

            while (fc != null)
            {
                if (fc.end(ruby.cObject))
                {
                    break;
                }
                if (fc.lookup(cp, out tmp))
                {
                    return(tmp + "::" + path);
                }
                tmp  = ruby.id2name(fc.name);
                path = tmp + "::" + path;
                fc   = fc.prev;
            }
            return(path);
        }
Beispiel #3
0
 private string fc_path(fc_result fc, uint name)
 {
     string path = ruby.id2name(name);
     string tmp;
     uint cp = ruby.intern("__classpath__");
     while (fc != null)
     {
         if (fc.end(ruby.cObject)) break;
         if (fc.lookup(cp, out tmp))
         {
             return tmp + "::" + path;
         }
         tmp = ruby.id2name(fc.name);
         path = tmp + "::" + path;
         fc = fc.prev;
     }
     return path;
 }