private void DoEmitLogical(YaleIlGenerator ilGenerator, ExpressionContext context) { // We have to do a 'fake' emit so we can get the positions of the labels var info = new ShortCircuitInfo(); // Create a temporary IL generator var ilgTemp = CreateTempIlGenerator(ilGenerator); // We have to make sure that the label count for the temp YaleIlGenerator matches our real YaleIlGenerator Utility.SyncFleeIlGeneratorLabels(ilGenerator, ilgTemp); // Do the fake emit EmitLogical(ilgTemp, info, context); // Clear everything except the label positions info.ClearTempState(); info.Branches.ComputeBranches(); Utility.SyncFleeIlGeneratorLabels(ilgTemp, ilGenerator); // Do the real emit EmitLogical(ilGenerator, info, context); }
private void DoEmitLogical(FleeILGenerator ilg, IServiceProvider services) { // We have to do a 'fake' emit so we can get the positions of the labels ShortCircuitInfo info = new ShortCircuitInfo(); // Create a temporary IL generator FleeILGenerator ilgTemp = this.CreateTempFleeILGenerator(ilg); // We have to make sure that the label count for the temp FleeILGenerator matches our real FleeILGenerator Utility.SyncFleeILGeneratorLabels(ilg, ilgTemp); // Do the fake emit this.EmitLogical(ilgTemp, info, services); // Clear everything except the label positions info.ClearTempState(); info.Branches.ComputeBranches(); Utility.SyncFleeILGeneratorLabels(ilgTemp, ilg); // Do the real emit this.EmitLogical(ilg, info, services); }
private void DoEmitLogical(FleeILGenerator ilg, IServiceProvider services) { // We have to do a 'fake' emit so we can get the positions of the labels ShortCircuitInfo info = new ShortCircuitInfo(); // Create a temporary IL generator FleeILGenerator ilgTemp = this.CreateTempFleeILGenerator(ilg); // We have to make sure that the label count for the temp FleeILGenerator matches our real FleeILGenerator Utility.SyncFleeILGeneratorLabels(ilg, ilgTemp); // Do the fake emit this.EmitLogical(ilgTemp, info, services); // Clear everything except the label positions info.ClearTempState(); info.Branches.ComputeBranches(); Utility.SyncFleeILGeneratorLabels(ilgTemp, ilg); // Do the real emit this.EmitLogical(ilg, info, services); }