Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConnectionIdRewritePass: field assignment and event mapping can in the same block #2327

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

wwh1004
Copy link
Contributor

@wwh1004 wwh1004 commented Mar 10, 2021

field assignment and event mapping can in the same block

see Block IL_00c3

Block IL_0000 (incoming: 1) {
	BlockContainer (switch) {
		Block IL_0007 (incoming: 1) {
			switch (ldloc connectionId) {
				case [long.MinValue..1),[21..long.MaxValue]: br IL_005c
				case [1..2): br IL_0068
				case [2..3): br IL_009b
				case [3..4): br IL_00c3
				case [4..5): br IL_00eb
				case [5..6): br IL_00fc
				case [6..7): br IL_010d
				case [7..8): br IL_011e
				case [8..9): br IL_012f
				case [9..10): br IL_0140
				case [10..11): br IL_0151
				case [11..12): br IL_0162
				case [12..13): br IL_017e
				case [13..14): br IL_019a
				case [14..15): br IL_01ab
				case [15..16): br IL_01bc
				case [16..17): br IL_01e1
				case [17..18): br IL_0206
				case [18..19): br IL_021f
				case [19..20): br IL_0238
				case [20..21): br IL_0251
			}
		}

		Block IL_0251 (incoming: 1) {
			stobj System.Windows.Controls.StackPanel(delayex.ldflda labels(ldloc this), castclass System.Windows.Controls.StackPanel(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_0238 (incoming: 1) {
			callvirt add_Click(castclass System.Windows.Controls.Button(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_7))
			leave IL_0007 (nop)
		}

		Block IL_021f (incoming: 1) {
			callvirt add_Click(castclass System.Windows.Controls.Button(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_8))
			leave IL_0007 (nop)
		}

		Block IL_0206 (incoming: 1) {
			callvirt add_Click(castclass System.Windows.Controls.Button(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_6))
			leave IL_0007 (nop)
		}

		Block IL_01e1 (incoming: 1) {
			stobj System.Windows.Controls.Button(delayex.ldflda sm(ldloc this), castclass System.Windows.Controls.Button(ldloc target))
			callvirt add_Click(ldobj System.Windows.Controls.Button(delayex.ldflda sm(ldloc this)), newobj RoutedEventHandler..ctor(ldloc this, ldftn sm_Click))
			leave IL_0007 (nop)
		}

		Block IL_01bc (incoming: 1) {
			stobj System.Windows.Controls.TextBox(delayex.ldflda shuru(ldloc this), castclass System.Windows.Controls.TextBox(ldloc target))
			callvirt add_KeyDown(ldobj System.Windows.Controls.TextBox(delayex.ldflda shuru(ldloc this)), newobj KeyEventHandler..ctor(ldloc this, ldftn shuru_KeyDown))
			leave IL_0007 (nop)
		}

		Block IL_01ab (incoming: 1) {
			stobj System.Windows.Controls.Label(delayex.ldflda count(ldloc this), castclass System.Windows.Controls.Label(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_019a (incoming: 1) {
			stobj System.Windows.Controls.ProgressBar(delayex.ldflda diskInfo(ldloc this), castclass System.Windows.Controls.ProgressBar(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_017e (incoming: 1) {
			callvirt add_Click(castclass System.Windows.Controls.MenuItem(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_11))
			leave IL_0007 (nop)
		}

		Block IL_0162 (incoming: 1) {
			callvirt add_Click(castclass System.Windows.Controls.MenuItem(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_10))
			leave IL_0007 (nop)
		}

		Block IL_0151 (incoming: 1) {
			stobj System.Windows.Controls.ListView(delayex.ldflda list(ldloc this), castclass System.Windows.Controls.ListView(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_0140 (incoming: 1) {
			stobj System.Windows.Controls.Grid(delayex.ldflda col4(ldloc this), castclass System.Windows.Controls.Grid(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_012f (incoming: 1) {
			stobj System.Windows.Controls.Grid(delayex.ldflda col3(ldloc this), castclass System.Windows.Controls.Grid(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_011e (incoming: 1) {
			stobj System.Windows.Controls.Grid(delayex.ldflda col2(ldloc this), castclass System.Windows.Controls.Grid(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_010d (incoming: 1) {
			stobj System.Windows.Controls.Grid(delayex.ldflda col1(ldloc this), castclass System.Windows.Controls.Grid(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_00fc (incoming: 1) {
			stobj AForge.Controls.VideoSourcePlayer(delayex.ldflda videoSourcePlayer_0(ldloc this), castclass AForge.Controls.VideoSourcePlayer(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_00eb (incoming: 1) {
			stobj HalconDotNet.HWindowControl(delayex.ldflda hwindowControl_0(ldloc this), castclass HalconDotNet.HWindowControl(ldloc target))
			leave IL_0007 (nop)
		}

		Block IL_00c3 (incoming: 1) {
			stobj System.Windows.Controls.ComboBox(delayex.ldflda baoguang(ldloc this), castclass System.Windows.Controls.ComboBox(ldloc target))
			callvirt add_SelectionChanged(ldobj System.Windows.Controls.ComboBox(delayex.ldflda baoguang(ldloc this)), newobj SelectionChangedEventHandler..ctor(ldloc this, ldftn baoguang_SelectionChanged))
			leave IL_0007 (nop)
		}

		Block IL_009b (incoming: 1) {
			stobj System.Windows.Controls.Label(delayex.ldflda barcode(ldloc this), castclass System.Windows.Controls.Label(ldloc target))
			callvirt add_MouseDoubleClick(ldobj System.Windows.Controls.Label(delayex.ldflda barcode(ldloc this)), newobj MouseButtonEventHandler..ctor(ldloc this, ldftn barcode_MouseDoubleClick))
			leave IL_0007 (nop)
		}

		Block IL_0068 (incoming: 1) {
			callvirt add_Loaded(castclass WpfApp1.MainWindow(ldloc target), newobj RoutedEventHandler..ctor(ldloc this, ldftn method_0))
			callvirt add_Closing(castclass WpfApp1.MainWindow(ldloc target), newobj CancelEventHandler..ctor(ldloc this, ldftn method_9))
			leave IL_0007 (nop)
		}

		Block IL_005c (incoming: 1) {
			stobj System.Boolean(delayex.ldflda bool_4(ldloc this), ldc.i4 1)
			leave IL_0007 (nop)
		}

	}
	leave IL_0000 (nop)
} at IL_0000

field assignment and event mapping can in the same block
@siegfriedpammer siegfriedpammer added this to the v7.0-rc milestone Mar 15, 2021
@siegfriedpammer siegfriedpammer merged commit ecb647e into icsharpcode:master Mar 18, 2021
@siegfriedpammer
Copy link
Member

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants