MSIL - how the call to the operation code knows which method to call is given as an integer

I am trying to understand how MSIL can represent a call to a static function only by storing an integer.

For example, if you add an Interlocked.Increment (ref someVariable) call, your IL will contain the following:

0x28 | 0x12,0x0,0x0,0xA

The pipe operator is my complement, essentially 0x28 is the call command, and 012, 0x0, 0x0, 0xA is the Block.Increment method.

Who decided this value? When you parse with ildasm, it pretty prints the name, but is there a table he's looking at?

Where is this table defined?

+4
source share
1 answer

ECMA-335, 0x0A000012 . - , , , .. . 0x0A MemberRef , 0x12 - .

(, ).

+1

Source: https://habr.com/ru/post/1606486/


All Articles