Esempio n. 1
0
 private void EmitBranch(OffsetInstruction instruction, BranchLabel label)
 {
     Emit(instruction);
     label.AddBranch(this, Count - 1);
 }
Esempio n. 2
0
 public void EmitBranch(BranchLabel label)
 {
     EmitBranch(new BranchInstruction(), label);
 }
Esempio n. 3
0
 public void MarkLabel(BranchLabel label)
 {
     label.Mark(this);
 }
Esempio n. 4
0
 public void EmitGoto(BranchLabel label, bool hasResult, bool hasValue, bool labelTargetGetsValue)
 {
     Emit(GotoInstruction.Create(EnsureLabelIndex(label), hasResult, hasValue, labelTargetGetsValue));
 }
Esempio n. 5
0
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel tryExpressionEndLabel)
 {
     Emit(LeaveExceptionHandlerInstruction.Create(EnsureLabelIndex(tryExpressionEndLabel), hasValue));
 }
Esempio n. 6
0
 public void EmitGoto(BranchLabel label, bool hasResult, bool hasValue, bool labelTargetGetsValue)
 {
     Emit(GotoInstruction.Create(EnsureLabelIndex(label), hasResult, hasValue, labelTargetGetsValue));
 }
Esempio n. 7
0
 public void EmitEnterFinally(BranchLabel finallyStartLabel)
 {
     Emit(EnterFinallyInstruction.Create(EnsureLabelIndex(finallyStartLabel)));
 }
Esempio n. 8
0
 public void EmitBranchFalse(BranchLabel elseLabel)
 {
     EmitBranch(new BranchFalseInstruction(), elseLabel);
 }
Esempio n. 9
0
 public void EmitCoalescingBranch(BranchLabel leftNotNull)
 {
     EmitBranch(new CoalescingBranchInstruction(), leftNotNull);
 }
Esempio n. 10
0
 public void EmitBranchFalse(BranchLabel elseLabel)
 {
     EmitBranch(new BranchFalseInstruction(), elseLabel);
 }
Esempio n. 11
0
 public void EmitBranch(BranchLabel label, bool hasResult, bool hasValue)
 {
     EmitBranch(new BranchInstruction(hasResult, hasValue), label);
 }
Esempio n. 12
0
 public void EmitBranch(BranchLabel label)
 {
     EmitBranch(new BranchInstruction(), label);
 }
Esempio n. 13
0
 private void EmitBranch(OffsetInstruction instruction, BranchLabel label)
 {
     Emit(instruction);
     label.AddBranch(this, Count - 1);
 }
Esempio n. 14
0
 public void EmitBranch(BranchLabel label, bool hasResult, bool hasValue)
 {
     EmitBranch(new BranchInstruction(hasResult, hasValue), label);
 }
Esempio n. 15
0
 public void EmitEnterFault(BranchLabel faultStartLabel)
 {
     Emit(EnterFaultInstruction.Create(EnsureLabelIndex(faultStartLabel)));
 }
Esempio n. 16
0
 public void EmitCoalescingBranch(BranchLabel leftNotNull)
 {
     EmitBranch(new CoalescingBranchInstruction(), leftNotNull);
 }
Esempio n. 17
0
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel tryExpressionEndLabel)
 {
     Emit(LeaveExceptionHandlerInstruction.Create(EnsureLabelIndex(tryExpressionEndLabel), hasValue));
 }
Esempio n. 18
0
 public void EmitEnterFinally(BranchLabel finallyStartLabel)
 {
     Emit(EnterFinallyInstruction.Create(EnsureLabelIndex(finallyStartLabel)));
 }
Esempio n. 19
0
        private int EnsureLabelIndex(BranchLabel label)
        {
            if (label.HasRuntimeLabel)
            {
                return label.LabelIndex;
            }

            label.LabelIndex = _runtimeLabelCount;
            _runtimeLabelCount++;
            return label.LabelIndex;
        }
Esempio n. 20
0
        public BranchLabel MakeLabel()
        {
            if (_labels == null)
            {
                _labels = new List<BranchLabel>();
            }

            var label = new BranchLabel();
            _labels.Add(label);
            return label;
        }
Esempio n. 21
0
 public void MarkLabel(BranchLabel label)
 {
     label.Mark(this);
 }