Exemplo n.º 1
0
 /// <summary>
 /// Constructs a new phi binding allocator.
 /// </summary>
 /// <param name="parent">The parent code generator.</param>
 /// <param name="cfg">The CFG to use.</param>
 public PhiBindingAllocator(CLCodeGenerator parent, CFG cfg)
 {
     phiMapping = new Dictionary <BasicBlock, List <Variable> >(cfg.Count);
     Parent     = parent;
     CFG        = cfg;
     Dominators = Dominators.Create(cfg);
 }
Exemplo n.º 2
0
            /// <summary>
            /// Constructs a new statement emitter using the given target.
            /// </summary>
            /// <param name="codeGenerator">The parent code generator.</param>
            internal StatementEmitter(CLCodeGenerator codeGenerator)
            {
                CodeGenerator = codeGenerator;
                stringBuilder = codeGenerator.Builder;
                argumentCount = 0;
                argMode       = false;

                codeGenerator.AppendIndent();
            }
Exemplo n.º 3
0
            /// <summary>
            /// Constructs a new statement emitter using the given target.
            /// </summary>
            /// <param name="codeGenerator">The parent code generator.</param>
            /// <param name="indent">The current indentation.</param>
            internal StatementEmitter(CLCodeGenerator codeGenerator, int indent)
            {
                CodeGenerator = codeGenerator;
                stringBuilder = codeGenerator.Builder;
                argumentCount = 0;
                argMode       = false;

                Indent = indent;
                stringBuilder.Append('\t', indent);
            }