Пример #1
0
        public static LLLabel Create(int pIdentifier)
        {
            LLLabel label = new LLLabel();

            label.mIdentifier = pIdentifier;
            return(label);
        }
Пример #2
0
 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));
 }
Пример #13
0
 public void EmitBranch(LLLocation pConditionSource, LLLabel pTrueTargetLabel, LLLabel pFalseTargetLabel)
 {
     Emit(LLBranchInstruction.Create(mFunction, pConditionSource, pTrueTargetLabel, pFalseTargetLabel));
 }
Пример #14
0
 public void EmitGoto(LLLabel pTargetLabel)
 {
     Emit(LLGotoInstruction.Create(mFunction, pTargetLabel));
 }
Пример #15
0
 public void Terminate(LLLabel pNextBlockStartLabel)
 {
     if (!mTerminated)
     {
         if (pNextBlockStartLabel == null) EmitReturn(null);
         else EmitGoto(pNextBlockStartLabel);
     }
 }
Пример #16
0
 public void EmitSwitch(LLLocation pConditionSource, LLLabel pDefaultTargetLabel, List<LLSwitchCase> pCases)
 {
     Emit(LLSwitchInstruction.Create(mFunction, pConditionSource, pDefaultTargetLabel, pCases));
 }
Пример #17
0
 public void EmitLabel(LLLabel pLabel)
 {
     Emit(LLLabelInstruction.Create(mFunction, pLabel));
 }