public override BoundNode VisitLocal(BoundLocal node)
        {
            var         catchFrame = _currentAwaitCatchFrame;
            LocalSymbol hoistedLocal;

            if (catchFrame == null || !catchFrame.TryGetHoistedLocal(node.LocalSymbol, out hoistedLocal))
            {
                return(base.VisitLocal(node));
            }

            return(node.Update(hoistedLocal, node.ConstantValueOpt, hoistedLocal.Type.TypeSymbol));
        }
示例#2
0
            public override BoundNode VisitLocal(BoundLocal node)
            {
                if (!node.LocalSymbol.SynthesizedKind.IsLongLived())
                {
                    LocalSymbol longLived;
                    if (_tempSubstitution.TryGetValue(node.LocalSymbol, out longLived))
                    {
                        return(node.Update(longLived, node.ConstantValueOpt, node.Type));
                    }
                }

                return(base.VisitLocal(node));
            }
        public override BoundNode VisitLocal(BoundLocal node)
        {
            var catchFrame = this.currentAwaitCatchFrame;

            if (catchFrame == null || !catchFrame.hoistedLocals.ContainsKey(node.LocalSymbol))
            {
                return(base.VisitLocal(node));
            }

            var newLocal = catchFrame.hoistedLocals[node.LocalSymbol];

            return(node.Update(newLocal, node.ConstantValueOpt, newLocal.Type));
        }
        public override BoundNode VisitLocal(BoundLocal node)
        {
            var catchFrame = _currentAwaitCatchFrame;
            LocalSymbol hoistedLocal;
            if (catchFrame == null || !catchFrame.TryGetHoistedLocal(node.LocalSymbol, out hoistedLocal))
            {
                return base.VisitLocal(node);
            }

            return node.Update(hoistedLocal, node.ConstantValueOpt, hoistedLocal.Type);
        }
示例#5
0
        public override BoundNode VisitLocal(BoundLocal node)
        {
            var catchFrame = this.currentAwaitCatchFrame;
            if (catchFrame == null || !catchFrame.hoistedLocals.ContainsKey(node.LocalSymbol))
            {
                return base.VisitLocal(node);
            }

            var newLocal = catchFrame.hoistedLocals[node.LocalSymbol];
            return node.Update(newLocal, node.ConstantValueOpt, newLocal.Type);
        }