示例#1
0
        public static LLLabel Create(int pIdentifier)
        {
            LLLabel label = new LLLabel();

            label.mIdentifier = pIdentifier;
            return(label);
        }
 public static LLInstructionBlock Create(LLFunction pFunction, LLLabel pStartLabel)
 {
     LLInstructionBlock block = new LLInstructionBlock();
     block.mFunction = pFunction;
     block.mStartLabel = pStartLabel;
     block.EmitLabel(pStartLabel);
     return block;
 }
示例#3
0
        public static LLInstructionBlock Create(LLFunction pFunction, LLLabel pStartLabel)
        {
            LLInstructionBlock block = new LLInstructionBlock();

            block.mFunction   = pFunction;
            block.mStartLabel = pStartLabel;
            block.EmitLabel(pStartLabel);
            return(block);
        }
示例#4
0
        public LLLabel CreateLabel(int pIdentifier)
        {
            if (mLabels == null)
            {
                mLabels = new LLLabelList();
            }
            LLLabel label = LLLabel.Create(pIdentifier);

            mLabels.Add(label);
            return(label);
        }
示例#5
0
 public void Terminate(LLLabel pNextBlockStartLabel)
 {
     if (!mTerminated)
     {
         if (pNextBlockStartLabel == null)
         {
             EmitReturn(null);
         }
         else
         {
             EmitGoto(pNextBlockStartLabel);
         }
     }
 }
示例#6
0
        public LLInstructionBlock CreateBlock(LLLabel pStartLabel)
        {
            if (mBlocks == null)
            {
                mBlocks = new List <LLInstructionBlock>();
            }
            LLInstructionBlock block = LLInstructionBlock.Create(this, pStartLabel);

            mBlocks.Add(block);
            if (mBlocks.Count == 1)
            {
                if (mLocals != null)
                {
                    foreach (LLLocal local in mLocals)
                    {
                        block.EmitAllocate(LLLocalLocation.Create(local));
                    }
                }
            }
            return(block);
        }
示例#7
0
 public LLInstructionBlock CreateBlock(LLLabel pStartLabel)
 {
     if (mBlocks == null) mBlocks = new List<LLInstructionBlock>();
     LLInstructionBlock block = LLInstructionBlock.Create(this, pStartLabel);
     mBlocks.Add(block);
     if (mBlocks.Count == 1)
     {
         if (mLocals != null)
         {
             foreach (LLLocal local in mLocals)
                 block.EmitAllocate(LLLocalLocation.Create(local));
         }
     }
     return block;
 }
示例#8
0
 public void EmitBranch(LLLocation pConditionSource, LLLabel pTrueTargetLabel, LLLabel pFalseTargetLabel)
 {
     Emit(LLBranchInstruction.Create(mFunction, pConditionSource, pTrueTargetLabel, pFalseTargetLabel));
 }
示例#9
0
 public void EmitLabel(LLLabel pLabel)
 {
     Emit(LLLabelInstruction.Create(mFunction, pLabel));
 }
示例#10
0
 public void EmitSwitch(LLLocation pConditionSource, LLLabel pDefaultTargetLabel, List <LLSwitchCase> pCases)
 {
     Emit(LLSwitchInstruction.Create(mFunction, pConditionSource, pDefaultTargetLabel, pCases));
 }
示例#11
0
 public static LLLabel Create(int pIdentifier)
 {
     LLLabel label = new LLLabel();
     label.mIdentifier = pIdentifier;
     return label;
 }
示例#12
0
 public void EmitGoto(LLLabel pTargetLabel)
 {
     Emit(LLGotoInstruction.Create(mFunction, pTargetLabel));
 }
 public void EmitBranch(LLLocation pConditionSource, LLLabel pTrueTargetLabel, LLLabel pFalseTargetLabel)
 {
     Emit(LLBranchInstruction.Create(mFunction, pConditionSource, pTrueTargetLabel, pFalseTargetLabel));
 }
 public void EmitGoto(LLLabel pTargetLabel)
 {
     Emit(LLGotoInstruction.Create(mFunction, pTargetLabel));
 }
 public void Terminate(LLLabel pNextBlockStartLabel)
 {
     if (!mTerminated)
     {
         if (pNextBlockStartLabel == null) EmitReturn(null);
         else EmitGoto(pNextBlockStartLabel);
     }
 }
 public void EmitSwitch(LLLocation pConditionSource, LLLabel pDefaultTargetLabel, List<LLSwitchCase> pCases)
 {
     Emit(LLSwitchInstruction.Create(mFunction, pConditionSource, pDefaultTargetLabel, pCases));
 }
 public void EmitLabel(LLLabel pLabel)
 {
     Emit(LLLabelInstruction.Create(mFunction, pLabel));
 }