Inheritance: System.Compiler.Block
コード例 #1
0
ファイル: ZDecompiler.cs プロジェクト: ZingModelChecker/Zing
 private AtomicBlock VisitAtomic(AtomicBlock atomic)
 {
     WriteStart("atomic");
     return (AtomicBlock)this.VisitBlock((Block)atomic);
 }
コード例 #2
0
ファイル: ZResolver.cs プロジェクト: ZingModelChecker/Zing
 private AtomicBlock VisitAtomic(AtomicBlock atomic)
 {
     return (AtomicBlock)this.VisitBlock((Block)atomic);
 }
コード例 #3
0
ファイル: BBSplitter.cs プロジェクト: ZingModelChecker/Zing
        private AtomicBlock VisitAtomic(AtomicBlock atomic)
        {
            Debug.Assert(!insideAtomicBlock);

            // Create a block to cause the current atomic block to end. The atomicity
            // level brings us to this block atomically. We do nothing here, but our
            // atomicity level goes back to zero, so we get a state transition at the
            // end of this empty block.
            BasicBlock exitBlock = AddBlock(new BasicBlock(null, CurrentContinuation));
            CurrentContinuation = exitBlock;

            insideAtomicBlock = true;
            this.VisitBlock((Block)atomic);
            insideAtomicBlock = false;

            // The following test is needed in case the atomic block does not have any statements
            // in it. In that case, CurrentContinuation is the block following the atomic block.
            if (CurrentContinuation.RelativeAtomicLevel > 0)
            {
                CurrentContinuation.IsAtomicEntry = true;
            }

            return atomic;
        }
コード例 #4
0
ファイル: ZDuplicator.cs プロジェクト: ZingModelChecker/Zing
 private AtomicBlock VisitAtomic(AtomicBlock atomic)
 {
     if (atomic == null) return null;
     AtomicBlock result = (AtomicBlock)this.VisitBlock(atomic);
     return result;
 }
コード例 #5
0
ファイル: ZChecker.cs プロジェクト: ZingModelChecker/Zing
        private Block VisitAtomic(AtomicBlock atomic)
        {
            Block newAtomic = null;
            if (atomic == null) return null;

            if (((ZMethod)this.currentMethod).Atomic)
            {
                this.HandleError(atomic, Error.AtomicBlockInAtomicMethod);
                return null;
            }

            if (this.insideAtomic)
            {
                this.HandleError(atomic, Error.AtomicBlockNested);
                return null;
            }

            this.insideAtomic = true;
            newAtomic = this.VisitBlock((Block)atomic);
            this.insideAtomic = false;

            return newAtomic;
        }