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

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

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