コード例 #1
0
        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));
            }
コード例 #3
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));
        }
コード例 #4
0
        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);
        }