internal ObjectData TryDereferenceAnyMany(Language.Environment env) { ObjectData self = this; while (env.IsPointerLikeOfType(self.RunTimeTypeInstance)) { self = self.DereferencedOnce(); } return(self); }
internal ObjectData TryDereferenceAnyOnce(Language.Environment env) { if (TryDereferenceAnyOnce(env, out ObjectData dereferenced)) { return(dereferenced); } else { return(this); } }
internal bool TryDereferenceAnyOnce(Language.Environment env, out ObjectData dereferenced) { if (env.IsPointerLikeOfType(this.RunTimeTypeInstance)) { dereferenced = this.DereferencedOnce(); return(true); } else { dereferenced = null; return(false); } }
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); } }
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); }