コード例 #1
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
        private int EnsureLabelIndex(BranchLabel label) {
            if (label.HasRuntimeLabel) {
                return label.LabelIndex;
            }

            label.LabelIndex = _runtimeLabelCount;
            _runtimeLabelCount++;
            return label.LabelIndex;
        }
コード例 #2
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void MarkLabel(BranchLabel label) {
     label.Mark(this);
 }
コード例 #3
0
 public void EmitGoto(BranchLabel label, bool hasResult, bool hasValue)
 {
     Emit(GotoInstruction.Create(EnsureLabelIndex(label), hasResult, hasValue));
 }
コード例 #4
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
        public BranchLabel MakeLabel() {
            if (_labels == null) {
                _labels = new List<BranchLabel>();
            }

            var label = new BranchLabel();
            _labels.Add(label);
            return label;
        }
コード例 #5
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitCoalescingBranch(BranchLabel leftNotNull) {
     EmitBranch(new CoalescingBranchInstruction(), leftNotNull);
 }
コード例 #6
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitEnterTryFinally(BranchLabel finallyStartLabel) {
     Emit(EnterTryFinallyInstruction.Create(EnsureLabelIndex(finallyStartLabel)));
 }
コード例 #7
0
 public void EmitEnterTryFinally(BranchLabel finallyStartLabel)
 {
     Emit(EnterTryFinallyInstruction.Create(EnsureLabelIndex(finallyStartLabel)));
 }
コード例 #8
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitBranch(BranchLabel label) {
     EmitBranch(new BranchInstruction(), label);
 }
コード例 #9
0
 public void EmitCoalescingBranch(BranchLabel leftNotNull)
 {
     EmitBranch(new CoalescingBranchInstruction(), leftNotNull);
 }
コード例 #10
0
 public void EmitBranchFalse(BranchLabel elseLabel)
 {
     EmitBranch(new BranchFalseInstruction(), elseLabel);
 }
コード例 #11
0
 public void EmitBranch(BranchLabel label, bool hasResult, bool hasValue)
 {
     EmitBranch(new BranchInstruction(hasResult, hasValue), label);
 }
コード例 #12
0
 public void EmitBranch(BranchLabel label)
 {
     EmitBranch(new BranchInstruction(), label);
 }
コード例 #13
0
 private void EmitBranch(OffsetInstruction instruction, BranchLabel label)
 {
     Emit(instruction);
     label.AddBranch(this, Count - 1);
 }
コード例 #14
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitGoto(BranchLabel label, bool hasResult, bool hasValue) {
     Emit(GotoInstruction.Create(EnsureLabelIndex(label), hasResult, hasValue));
 }
コード例 #15
0
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel tryExpressionEndLabel)
 {
     Emit(LeaveExceptionHandlerInstruction.Create(EnsureLabelIndex(tryExpressionEndLabel), hasValue));
 }
コード例 #16
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 private void EmitBranch(OffsetInstruction instruction, BranchLabel label) {
     Emit(instruction);
     label.AddBranch(this, Count - 1);
 }
コード例 #17
0
ファイル: InstructionList.cs プロジェクト: mstram/ironruby
 public void EmitGoto(BranchLabel label, bool hasResult, bool hasValue) {
     Emit(new GotoInstruction(Count, hasResult, hasValue));
     label.AddBranch(Count - 1);
 }
コード例 #18
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitBranch(BranchLabel label, bool hasResult, bool hasValue) {
     EmitBranch(new BranchInstruction(hasResult, hasValue), label);
 }
コード例 #19
0
ファイル: InstructionList.cs プロジェクト: mstram/ironruby
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel startOfFinally) {
     EmitBranch(new LeaveExceptionHandlerInstruction(hasValue), startOfFinally);
 }
コード例 #20
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitBranchFalse(BranchLabel elseLabel) {
     EmitBranch(new BranchFalseInstruction(), elseLabel);
 }
コード例 #21
0
 public void EmitBranchNull(BranchLabel elseLabel) {
     EmitBranch(new BranchNullInstruction(), elseLabel);
 }
コード例 #22
0
ファイル: InstructionList.cs プロジェクト: BenHall/ironruby
 public void EmitLeaveExceptionHandler(bool hasValue, BranchLabel tryExpressionEndLabel) {
     Emit(LeaveExceptionHandlerInstruction.Create(EnsureLabelIndex(tryExpressionEndLabel), hasValue));
 }
コード例 #23
0
 public void MarkLabel(BranchLabel label)
 {
     label.Mark(this);
 }