Esempio n. 1
0
        public override void Compile(sunCompiler compiler)
        {
            Condition.Compile(compiler);
            var falsePrologue = new sunJumpNotEqualSite(compiler.Binary);

            TrueBody.Compile(compiler);
            var trueEpilogue = new sunJumpSite(compiler.Binary);

            falsePrologue.Relocate();
            FalseBody.Compile(compiler);
            trueEpilogue.Relocate();
        }
Esempio n. 2
0
        public override void Compile(sunCompiler compiler)
        {
            Condition.Compile(compiler);
            var trueBodyEpilogue = new sunJumpNotEqualSite(compiler.Binary);

            TrueBody.Compile(compiler);
            var falseBody = FalseBody;

            if (falseBody != null)
            {
                var falseBodyEpilogue = new sunJumpSite(compiler.Binary);
                trueBodyEpilogue.Relocate();
                falseBody.Compile(compiler);
                falseBodyEpilogue.Relocate();
            }
            else
            {
                trueBodyEpilogue.Relocate();
            }
        }