Exemple #1
0
        public override void RenderIL_Load(ILCanvas canvas)
        {
            ILCanvasLabel label = canvas.CreateLabel();

            foreach (ILValue value in values.TruncateFromEnd(1))
            {
                value.RenderIL_Load(canvas);
                canvas.Emit_Dup();

                label.Emit_Brtrue();
                canvas.Emit_Pop();
            }
            values.GetLast().RenderIL_Load(canvas);

            label.Emit_Label();
        }
Exemple #2
0
        public override void RenderIL_Load(ILCanvas canvas)
        {
            ILCanvasLabel end_label  = canvas.CreateLabel();
            ILCanvasLabel true_label = canvas.CreateLabel();

            foreach (ILValue value in values)
            {
                value.RenderIL_Load(canvas);
                true_label.Emit_Brtrue();
            }

            canvas.Emit_Ldc_I4(0);
            end_label.Emit_Br();

            true_label.Emit_Label();
            canvas.Emit_Ldc_I4(1);

            end_label.Emit_Label();
        }