コード例 #1
0
ファイル: LLLabel.cs プロジェクト: Astaelan/Neutron
        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
ファイル: LLFunction.cs プロジェクト: kvanberendonck/Neutron
 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
ファイル: LLLabel.cs プロジェクト: kvanberendonck/Neutron
 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));
 }