Esempio n. 1
0
        internal ObjectData TryDereferenceAnyMany(Language.Environment env)
        {
            ObjectData self = this;

            while (env.IsPointerLikeOfType(self.RunTimeTypeInstance))
            {
                self = self.DereferencedOnce();
            }
            return(self);
        }
Esempio n. 2
0
 internal ObjectData TryDereferenceAnyOnce(Language.Environment env)
 {
     if (TryDereferenceAnyOnce(env, out ObjectData dereferenced))
     {
         return(dereferenced);
     }
     else
     {
         return(this);
     }
 }
Esempio n. 3
0
 internal bool TryDereferenceAnyOnce(Language.Environment env, out ObjectData dereferenced)
 {
     if (env.IsPointerLikeOfType(this.RunTimeTypeInstance))
     {
         dereferenced = this.DereferencedOnce();
         return(true);
     }
     else
     {
         dereferenced = null;
         return(false);
     }
 }
Esempio n. 4
0
        internal bool TryDereferenceMany(Language.Environment env, IExpression parentExpr, IExpression childExpr,
                                         out ObjectData dereferenced)
        {
            int deref_count = dereferencedCount(parentExpr, childExpr);

            if (deref_count > 0)
            {
                dereferenced = this.TryDereferenceAnyMany(env, deref_count);
                return(true);
            }
            else
            {
                dereferenced = null;
                return(false);
            }
        }
Esempio n. 5
0
        internal ObjectData TryDereferenceAnyMany(Language.Environment env, int count)
        {
            ObjectData self = this;

            for (int i = 0; i < count; ++i)
            {
                if (!env.IsPointerLikeOfType(self.RunTimeTypeInstance))
                {
                    break;
                }
                else
                {
                    self = self.DereferencedOnce();
                }
            }
            return(self);
        }