public override BoundNode VisitBaseReference(BoundBaseReference node)
        {
            // TODO: fix up the type of the resulting node to be the base type
            CapturedSymbolReplacement proxy = proxies[this.originalMethod.ThisParameter];

            Debug.Assert(proxy != null);
            return(proxy.Replacement(F.Syntax, frameType => F.This()));
        }
Exemple #2
0
        protected BoundStatement CacheThisIfNeeded()
        {
            // restore "this" cache, if there is a cache
            if ((object)this.cachedThis != null)
            {
                CapturedSymbolReplacement proxy = proxies[this.OriginalMethod.ThisParameter];
                var fetchThis = proxy.Replacement(F.Syntax, frameType => F.This());
                return(F.Assignment(F.Local(this.cachedThis), fetchThis));
            }

            // do nothing
            return(F.StatementList());
        }
Exemple #3
0
        public override BoundNode VisitBaseReference(BoundBaseReference node)
        {
            // TODO: fix up the type of the resulting node to be the base type

            // if "this" is cached, return it.
            if ((object)this.cachedThis != null)
            {
                return(F.Local(this.cachedThis));
            }

            CapturedSymbolReplacement proxy = proxies[this.OriginalMethod.ThisParameter];

            Debug.Assert(proxy != null);
            return(proxy.Replacement(F.Syntax, frameType => F.This()));
        }