Skip to content

ReactorSlayer does not support generic classes #72

Description

@greenozon

If the protected assembly has got some classes with generics the tool does not remove switch/case spaghetti

eg: public class List : IEnumerable, IEnumerable

will have left following junk and more

			private bool MoveNext()
			{
				int num = 6;
				int num4 = default(int);
				List<T> list = default(List<T>);
				while (true)
				{
					int num2 = _003C_003E1__state;
					int num3 = 5;
					if (smethod_0())
					{
						while (true)
						{
							switch (num3)
							{
							case 15:
								_003Ci_003E5__2 = num4 + 1;
								num3 = 14;
								if (smethod_0())
								{
									continue;
								}
								goto IL_0028;
							case 12:
							case 14:
								if (_003Ci_003E5__2 < list.Count)
								{
									num3 = 0;
									if (smethod_1() == null)
									{
										continue;
									}
									goto IL_0122;
								}
								goto case 8;
							case 10:
								if (num2 == 0)
								{
									goto case 4;
								}
								goto case 2;
							case 4:
								_003C_003E1__state = -1;
								num3 = 1;
								if (smethod_1() == null)
								{
									continue;
								}
								goto IL_0028;
							case 2:
								if (num2 != 1)
								{
									goto case 11;
								}
								_003C_003E1__state = -1;
								num3 = 3;
								if (smethod_0())
								{
									continue;
								}
								goto IL_0028;
							case 5:
								list = _003C_003E4__this;
								goto case 10;
							case 3:
								num4 = _003Ci_003E5__2;
								num3 = 15;
								if (smethod_0())
								{
									continue;
								}
								goto IL_0028;
							case 1:
								_003Ci_003E5__2 = 0;
								goto case 12;
							case 6:
								break;
							case 11:
								return false;
							default:
								goto IL_0122;
							case 9:
								goto IL_013a;
							case 13:
								goto end_IL_0108;
							case 8:
								{
									return false;
								}
								IL_0028:
								num3 = num;
								continue;
							}
							break;
						}
						continue;
					}
					goto IL_0122;
					IL_013a:
					_003C_003E1__state = 1;
					num = 13;
					break;
					IL_0122:
					_003C_003E2__current = list.method_1()[_003Ci_003E5__2];
					goto IL_013a;
					continue;
					end_IL_0108:
					break;
				}
				return true;
			}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions