예제 #1
0
        public override void Emit(IlBuilder builder)
        {
            base.Emit(builder);

            if (hasValue)
            {
                _exp.Push(builder);
            }

            builder.EmitOpCode(OpCodes.Ret);
        }
예제 #2
0
        public override void Emit(IlBuilder builder)
        {
            base.Emit(builder);

            _op?.Push(builder);

            OpCode op = Condition switch
            {
                BranchCondition.Always => OpCodes.Br,
                BranchCondition.OnFalse => OpCodes.Brfalse,
                BranchCondition.Leave => OpCodes.Leave,
                _ => OpCodes.Brtrue
            };

            builder.EmitOpCode(op, _label);
        }
예제 #3
0
 public void PushValue(CodeValue val)
 {
     val.Push(this);
 }