Lines Matching refs:rewrites
307 IList<RewriteOperation> rewrites = GetProgram( programName ); in InsertBefore()
308 op.instructionIndex = rewrites.Count; in InsertBefore()
309 rewrites.Add( op ); in InsertBefore()
339 IList<RewriteOperation> rewrites = GetProgram( programName ); in Replace()
340 op.instructionIndex = rewrites.Count; in Replace()
341 rewrites.Add( op ); in Replace()
454 IList<RewriteOperation> rewrites; in ToString()
455 if ( !programs.TryGetValue( programName, out rewrites ) ) in ToString()
456 rewrites = null; in ToString()
464 if ( rewrites == null || rewrites.Count == 0 ) in ToString()
471 … IDictionary<int, RewriteOperation> indexToOp = ReduceToSingleOperationPerIndex( rewrites ); in ToString()
565 …ctionary<int, RewriteOperation> ReduceToSingleOperationPerIndex( IList<RewriteOperation> rewrites ) in ReduceToSingleOperationPerIndex() argument
570 for ( int i = 0; i < rewrites.Count; i++ ) in ReduceToSingleOperationPerIndex()
572 RewriteOperation op = rewrites[i]; in ReduceToSingleOperationPerIndex()
577 ReplaceOp rop = (ReplaceOp)rewrites[i]; in ReduceToSingleOperationPerIndex()
579 var inserts = GetKindOfOps( rewrites, typeof( InsertBeforeOp ), i ); in ReduceToSingleOperationPerIndex()
587 rewrites[iop.instructionIndex] = null; in ReduceToSingleOperationPerIndex()
593 rewrites[iop.instructionIndex] = null; in ReduceToSingleOperationPerIndex()
597 var prevReplaces = GetKindOfOps( rewrites, typeof( ReplaceOp ), i ); in ReduceToSingleOperationPerIndex()
604 rewrites[prevRop.instructionIndex] = null; in ReduceToSingleOperationPerIndex()
617 rewrites[prevRop.instructionIndex] = null; // kill first delete in ReduceToSingleOperationPerIndex()
631 for ( int i = 0; i < rewrites.Count; i++ ) in ReduceToSingleOperationPerIndex()
633 RewriteOperation op = (RewriteOperation)rewrites[i]; in ReduceToSingleOperationPerIndex()
638 InsertBeforeOp iop = (InsertBeforeOp)rewrites[i]; in ReduceToSingleOperationPerIndex()
640 var prevInserts = GetKindOfOps( rewrites, typeof( InsertBeforeOp ), i ); in ReduceToSingleOperationPerIndex()
650 rewrites[prevIop.instructionIndex] = null; in ReduceToSingleOperationPerIndex()
654 var prevReplaces = GetKindOfOps( rewrites, typeof( ReplaceOp ), i ); in ReduceToSingleOperationPerIndex()
661 rewrites[i] = null; // delete current insert in ReduceToSingleOperationPerIndex()
673 for ( int i = 0; i < rewrites.Count; i++ ) in ReduceToSingleOperationPerIndex()
675 RewriteOperation op = (RewriteOperation)rewrites[i]; in ReduceToSingleOperationPerIndex()
694 …protected virtual IList<RewriteOperation> GetKindOfOps( IList<RewriteOperation> rewrites, Type kin… in GetKindOfOps() argument
696 return GetKindOfOps( rewrites, kind, rewrites.Count ); in GetKindOfOps()
700 …protected virtual IList<RewriteOperation> GetKindOfOps( IList<RewriteOperation> rewrites, Type kin… in GetKindOfOps() argument
703 for ( int i = 0; i < before && i < rewrites.Count; i++ ) in GetKindOfOps()
705 RewriteOperation op = rewrites[i]; in GetKindOfOps()