private void MergeBlockAssignments(ISymbolTable context, ISymbolTable adjustedContext, BlockAssignment[] blockAssignments)
 {
     foreach (var blockAssignment in blockAssignments)
       {
     Fragment propagatedFragmentType = context.GetFragmentType (blockAssignment.SourceSymbol);
     adjustedContext.MakeSafe (blockAssignment.TargetSymbol, propagatedFragmentType);
       }
 }
예제 #2
0
 public BasicBlock(
 int id, IPreCondition[] preConditions, ISymbolTable postConditionSymbolTable, int[] successorKeys, BlockAssignment[] blockAssignments)
 {
     _preConditions = ArgumentUtility.CheckNotNull ("preConditions", preConditions);
       _postConditionSymbolTable = ArgumentUtility.CheckNotNull ("postConditionSymbolTable", postConditionSymbolTable);
       _successorKeys = ArgumentUtility.CheckNotNull ("successorKeys", successorKeys);
       _id = id;
       _blockAssignments = blockAssignments;
 }
 private ISymbolTable UpdateContext(ISymbolTable context, ISymbolTable postConditionSymbolTable, BlockAssignment[] blockAssignments)
 {
     ISymbolTable adjustedContext = context.Copy();
       MergePostConditions (adjustedContext, postConditionSymbolTable);
       MergeBlockAssignments (context, adjustedContext, blockAssignments);
       return adjustedContext;
 }