Ejemplo n.º 1
0
        public override void Emit(FleeIlGenerator ilg, IServiceProvider services)
        {
            var flag = this.myTargetCollectionType != null;

            if (flag)
            {
                this.EmitCollectionIn(ilg, services);
            }
            else
            {
                var bm = new BranchManager();
                bm.GetLabel("endLabel", ilg);
                bm.GetLabel("trueTerminal", ilg);
                var ilgTemp = this.CreateTempFleeIlGenerator(ilg);
                Utility.SyncFleeILGeneratorLabels(ilg, ilgTemp);
                this.EmitListIn(ilgTemp, services, bm);
                bm.ComputeBranches();
                this.EmitListIn(ilg, services, bm);
            }
        }
Ejemplo n.º 2
0
        public override void Emit(FleeIlGenerator ilg, IServiceProvider services)
        {
            var bm = new BranchManager();

            bm.GetLabel("falseLabel", ilg);
            bm.GetLabel("endLabel", ilg);
            var isTemp = ilg.IsTemp;

            if (isTemp)
            {
                this.EmitConditional(ilg, services, bm);
            }
            else
            {
                var ilgTemp = this.CreateTempFleeIlGenerator(ilg);
                Utility.SyncFleeILGeneratorLabels(ilg, ilgTemp);
                this.EmitConditional(ilgTemp, services, bm);
                bm.ComputeBranches();
                this.EmitConditional(ilg, services, bm);
            }
        }